Apr
MAY
Jun
30
2021
2022
2023
About this capture
T h e W a y b a c k M a c h i n e - h t t p : / / w e b . a r c h i v e . o r g / w e b / 2 0 2 2 0 5 3 0 0 5 2 7 5 7 / h t t p s : / / d o c s . d e l t a . e x c h a n g e /
N A V
P y t h o n
c U R L
R u b y
●
I n t r o d u c t i o n
●
G e n e r a l I n f o r m a t i o n
●
D e f i n i t i o n s
●
S y m b o l o g y
●
P a g i n a t i o n
●
D a t a C e n t e r s
●
A u t h e n t i c a t i o n
●
C o m m o n E r r o r s
●
G e n e r a t i n g a n A P I K e y
●
A P I K e y P e r m i s s i o n s
●
C r e a t i n g a R e q u e s t
●
S i g n i n g a M e s s a g e
●
R a t e L i m i t s
●
R E S T A P I C o s t S t r u c t u r e
●
I n c r e a s i n g y o u r r a t e l i m i t s
●
T y p e s
●
T i m e s t a m p s
●
N u m b e r s
●
I D s
●
R e s p o n s e F o r m a t s
●
R e s t A p i
●
A s s e t s
●
G e t l i s t o f a l l a s s e t s
●
I n d i c e s
●
G e t i n d i c e s
●
P r o d u c t s
●
G e t l i s t o f p r o d u c t s
●
G e t p r o d u c t b y s y m b o l
●
G e t t i c k e r s f o r p r o d u c t s
●
G e t t i c k e r f o r a p r o d u c t b y s y m b o l
●
O r d e r s
●
P l a c e O r d e r
●
C a n c e l O r d e r
●
E d i t O r d e r
●
G e t A c t i v e O r d e r s
●
C a n c e l a l l o p e n o r d e r s
●
C r e a t e b a t c h o r d e r s
●
E d i t b a t c h o r d e r s
●
D e l e l e b a t c h o r d e r s
●
C h a n g e o r d e r l e v e r a g e
●
G e t o r d e r l e v e r a g e
●
P o s i t i o n s
●
G e t p o s i t i o n
●
G e t m a r g i n e d p o s i t i o n s
●
A d d / R e m o v e p o s i t i o n m a r g i n
●
C l o s e a l l p o s i t i o n s
●
T r a d e H i s t o r y
●
G e t o r d e r h i s t o r y ( c a n c e l l e d a n d c l o s e d )
●
G E T u s e r f i l l s b y f i l t e r s
●
D o w n l o a d W a l l e t t r a n s a c t i o n s
●
O r d e r b o o k
●
G e t L 2 o r d e r b o o k
●
T r a d e s
●
G e t p u b l i c t r a d e s
●
W a l l e t
●
G e t W a l l e t B a l a n c e s
●
G e t W a l l e t t r a n s a c t i o n s
●
D o w n l o a d W a l l e t t r a n s a c t i o n s
●
O H L C C a n d l e s
●
G E T o h l c c a n d l e s
●
G E T p r o d u c t h i s t o r y s p a r k l i n e
●
S t a t s
●
G e t v o l u m e s t a t s
●
S c h e m a s
●
A p i S u c c e s s R e s p o n s e
●
A p i E r r o r R e s p o n s e
●
I n d e x
●
A r r a y O f I n d i c e s
●
A s s e t
●
A r r a y O f A s s e t s
●
P r o d u c t
●
A r r a y O f P r o d u c t s
●
O r d e r
●
A r r a y O f O r d e r s
●
C r e a t e O r d e r R e q u e s t
●
A r r a y O f C r e a t e O r d e r R e q u e s t
●
E d i t O r d e r R e q u e s t
●
A r r a y O f E d i t O r d e r R e q u e s t
●
D e l e t e O r d e r R e q u e s t
●
C a n c e l A l l F i l t e r O b j e c t
●
A r r a y O f D e l e t e O r d e r R e q u e s t
●
P o s i t i o n
●
A r r a y O f P o s i t i o n s
●
F i l l
●
A r r a y O f F i l l s
●
O r d e r L e v e r a g e
●
L 2 O r d e r b o o k
●
T r a d e s
●
W a l l e t
●
A r r a y O f W a l l e t s
●
T r a n s a c t i o n
●
A r r a y O f T r a n s a c t i o n s
●
g r e e k s
●
p r i c e _ b a n d
●
q u o t e s
●
T i c k e r
●
A r r a y O f T i c k e r s
●
P a g i n a t i o n M e t a
●
O H L C D a t a
●
A r r a y O f O H L C D a t a
●
S p a r k l i n e D a t a
●
S t a t s
●
P l a c e o r d e r e r r o r s
●
E r r o r s
●
R e s t C l i e n t s
●
C C X T
●
W e b s o c k e t F e e d
●
S u b s c r i b i n g t o C h a n n e l s
●
S u b s c r i b e
●
U n s u b s c r i b e
●
A u t h e n t i c a t i n g a c o n n e c t i o n
●
D e t e c t i n g C o n n e c t i o n D r o p s
●
H e a r t b e a t ( R e c o m m e n d e d )
●
P i n g / P o n g
●
P u b l i c C h a n n e l s
●
v 2 t i c k e r
●
l 2 _ o r d e r b o o k
●
a l l _ t r a d e s
●
m a r k _ p r i c e
●
s p o t _ p r i c e
●
f u n d i n g _ r a t e
●
p r o d u c t _ u p d a t e s
●
a n n o u n c e m e n t s
●
c a n d l e s t i c k s
●
P r i v a t e C h a n n e l s
●
M a r g i n s
●
P o s i t i o n s
●
O r d e r s
●
U s e r T r a d e s
●
W e b S o c k e t R P C
●
R e q u e s t M e s s a g e
●
R e s p o n s e M e s s a g e
●
C h a n g e l o g
●
V 2 R e s t A p i
●
N e w S o c k e t C h a n n e l s
●
S e c u r i t y
●
T a r g e t s I n s c o p e
●
H o w t o a c c e s s
●
R e w a r d r a n g e
●
R u l e s o f e n g a g e m e n t
●
R u l e s o f r e p o r t i n g
●
R e c o m m e n d e d R e p o r t i n g f o r m a t
●
I n e l i g i b l e i s s u e s
I n t r o d u c t i o n
W e l c o m e t o t h e D e l t a E x c h a n g e A P I ! Y o u c a n u s e t h i s A P I t o p l a c e o r d e r s o n D e l t a E x c h a n g e a n d l i s t e n t o m a r k e t f e e d .
W e h a v e l a n g u a g e b i n d i n g s i n S h e l l , P y t h o n , R u b y a n d N o d e j s ! Y o u c a n v i e w c o d e e x a m p l e s i n t h e d a r k a r e a t o t h e r i g h t , a n d y o u c a n s w i t c h t h e p r o g r a m m i n g l a n g u a g e o f t h e e x a m p l e s w i t h t h e t a b s i n t h e t o p r i g h t .
S c r o l l d o w n f o r c o d e s a m p l e s , e x a m p l e r e q u e s t s a n d r e s p o n s e s . S e l e c t a l a n g u a g e f o r c o d e s a m p l e s f r o m t h e t a b s a b o v e o r t h e m o b i l e n a v i g a t i o n m e n u .
D e f i n i t i o n s
A s s e t s : a r e c r y p t o c u r r e n c i e s o r f i a t c u r r e n c i e s . E a c h a s s e t h a s a 3 / 4 l e t t e r c o d e ( e . g . B T C , U S D C ) . A d e r i v a t i v e c o n t r a c t o n D e l t a E x c h a n g e w i l l e n t a i l m u l t i p l e a s s e t s , n a m e l y :
U n d e r l y i n g A s s e t : T h i s i s t h e a s s e t o v e r w h i c h a f u t u r e s o r p e r p e t u a l c o n t r a c t i s d e f i n e d . F o r e . g . t h e u n d e r l y i n g a s s e t o f t h e B T C U S D p e r p e t u a l c o n t r a c t i s B T C .
Q u o t i n g A s s e t : T h e a s s e t i n w h i c h p r i c e o f t h e q u o t i n g i s c a l l e d t h e q u o t i n g a s s e t . F o r e . g . t h e B T C U S D c o n t r a c t i s q u o t e d i n U S D . T h e r e f o r e , t h e q u o t i n g a s s e t o f t h e c o n t r a c t i s U S D .
S e t t l i n g A s s e t : T h e a s s e t i n w h i c h t h e m a r g i n a n d P r o f i t / L o s s o f a c o n t r a c t i s d e n o m i n a t e d . F o r e . g . t h e B T C U S D c o n t r a c t i s m a r g i n e d a n d s e t t l e d i n B T C . T h e r e f o r e , t h e s e t t l i n g a s s e t o f t h e c o n t r a c t i s B T C .
P r o d u c t s : a r e t h e d e r i v a t i v e c o n t r a c t s l i s t e d o n D e l t a E x c h a n g e . E a c h c o n t r a c t c a n b e r e f e r r e d b y e i t h e r i t s P r o d u c t I D ( e . g . 2 7 i s t h e P r o d u c t I D o f B T C U S D c o n t r a c t ) o r S y m b o l ( B T C U S D i s t h e s y m b o l f o r B T C U S D c o n t r a c t ) . I t i s w o r t h n o t i n g t h a t O r d e r s , O r d e r b o o k A P I s e x p e c t P r o d u c t I D s .
e . g
product_id
symbol
product_type
description
27
BTCUSD
inverse_future
Bitcoin Perpetual futures, quoted in US Dollar and settled & margined in BTC
45
XRPUSDQ
future
XRP/USD perpetual futures USDC Quanto, quoted in US Dollar and settled & margined in USDC
46
BTCUSD_27Dec
inverse_future
27th December Bitcoin future quoted in US Dollar
S y m b o l o g y
C o n t r a c t s y m b o l : h a s t h e f o l l o w i n g f o r m a t
U n d e r l y i n g A s s e t | Q u o t i n g A s s e t | Q ( o p t i o n a l ; a p p l i c a b l e o n l y t o q u a n t o c o n t r a c t s ) | _ | M a t r u i t y D a t e ( o p t i o n a l , a p p l i c a b l e o n l y f o r f u t u r e s c o n t r a c t s )
e . g . B T C U S D , B T C U S D _ 2 7 D e c , L E O U S D Q
M a r k P r i c e : E a c h c o n t r a c t h a s a u n i q u e M a r k P r i c e w h i c h c a n b e r e f e r r e d t o b y : M A R K : C o n t r a c t _ S y m b o l ( M A R K : B T C U S D )
I n d e x P r i c e : T h e p r i c e s o f t h e u n d e r l y i n g a s s e t s f o r t h e c o n t r a c t s l i s t e d o n D e l t a E x c h a n g e a r e o b t a i n e d f r o m v a r i o u s s p o t e x c h a n g e s , a n d a r e c o m p u t e d b y a v e r a g i n g p r i c e s f r o m m u l t i p l e e x c h a n g e s . D e t a i l s o f a l l t h e i n d i c e s a r e a v a i l a b l e o n t h i s p a g e .
F o r a g i v e n U n d e r l y i n g A s s e t / Q u o t i n g A s s e t p a i r , t h e I n d e x p r i c e s y m b o l i s : . D E | U n d e r l y i n g A s s e t | Q u o t i n g A s s e t |
e . g . . D E B N B X B T
I t i s i m p o r t a n t t o n o t e t h a t t h e B T C U S D I n d e x p r i c e d o e s n ' t f o l l o w t h i s c o n v e n t i o n a s i t s s y m b o l i s . D E X B T U S D .
P a g i n a t i o n a l l o w s t o f e t c h d a t a p a g e - w i s e . W e u s e c u r s o r b a s e d p a g i n a t i o n w h e r e e a c h r e s p o n s e m e t a d a t a c o n t a i n s a b e f o r e a n d a f t e r c u r s o r . T h e c u r s o r n e e d s t o p a s s e d o n w i t h t h e n e x t r e q u e s t t o p a g i n a t e o v e r t h e r e s u l t . P l e a s e n o t e t h a t t h e c u r s o r s a r e u p d a t e d w i t h e a c h n e w p a g e .
P a g i n a t i o n c a n b e c a l l e d i n f o l l o w i n g A P I s
API
End point
Products
/products
Orders
/orders
Orders History
/orders/history
Fills
/fills
Wallet transactions
/wallet/transactions
P a g i n a t i o n p a r a m e t e r s
● a f t e r
● a f t e r c u r s o r t o f e t c h t h e n e x t p a g e
● b e f o r e
● b e f o r e c u r s o r t o f e t c h t h e p r e v i o u s p a g e
● p a g e _ s i z e
● p a g e s i z e f o r p a g i n a t i o n
I n A P I r e s p o n s e , m e t a d a t a w i l l c o n t a i n t h e c u r s o r s a s s h o w b e l o w
{
success: true,
result: [ {}, {}, .....],
meta: {
after: "an_arbitary_string",
before: "another_arbitary_string"
}
}
E x a m p l e
h t t p s : / / a p i . d e l t a . e x c h a n g e / v 2 / p r o d u c t s ? p a g e _ s i z e = 3 0
h t t p s : / / a p i . d e l t a . e x c h a n g e / v 2 / p r o d u c t s ? p a g e _ s i z e = 3 0 & a f t e r = a f t e r _ c u r s o r _ f r o m _ l a s t _ r e q u e s t
D a t a C e n t e r s
D e l t a E x c h a n g e d a t a c e n t e r s a r e i n A W S I r e l a n d
A u t h e n t i c a t i o n
A p i e n d p o i n t s t h a t p l a c e o r d e r s o r f e t c h a c c o u n t r e l a t e d i n f o r m a t i o n n e e d s t o a u t h e n t i c a t e d u s i n g a p i k e y a n d a p i s e c r e t .
C o m m o n E r r o r s
N o t e
Y o u s h o u l d u s e n t p t i m e s t a m p t o s y n c l o c a l c l o c k s i n o r d e r t o a v o i d f o l l o w i n g i s s u e :
● { " e r r o r : " S i g n a t u r e E x p i r e d " , m e s s a g e : " y o u r s i g n a t u r e h a s e x p i r e d " }
S i g n a t u r e c r e a t e d i n t h e l a s t 5 s e c o n d s i s a l l o w e d . i f s i g n a t u r e r e a c h e s d e l t a s y s t e m p o s t 5 s e c o n d s o f g e n e r a t i o n , t h e n i t w i l l f a i l .
● { " e r r o r " : " I n v a l i d A p i K e y " , m e s s a g e : " A p i K e y n o t f o u n d " }
a b o v e e r r o r w i l l b e t h r o w n i f y o u a r e n o t u s i n g c o r r e c t k e y , p l e a s e c h e c k h o s t n a m e e . g . e r r o n e o u s l y T e s t n e t . D e l t a . e x c h a n g e a p i k e y h a v e b e e n u s e d i n s t e a d o f D e l t a . e x c h a n g e a p i k e y
● { " e r r o r : " U n a u t h o r i z e d A p i A c c e s s " , m e s s a g e : " A p i K e y n o t a u t h o r i s e d t o a c c e s s t h i s e n d p o i n t " }
C h e c k a p i k e y h a v e r e q u i r e d p e r m i s s i o n s l i k e t r a d i n g p e r m i s s i o n
G e n e r a t i n g a n A P I K e y
B e f o r e b e i n g a b l e t o s i g n a n y r e q u e s t s , y o u m u s t c r e a t e a n A P I k e y v i a t h e D e l t a w e b s i t e . U p o n c r e a t i n g a k e y y o u w i l l r e c e i v e a p i k e y a n d a p i s e c r e t , w h i c h y o u m u s t r e m e m b e r a n d s e c u r e a t y o u r e n d . T h e K e y a n d S e c r e t w i l l b e r a n d o m l y g e n e r a t e d .
Y o u c a n c r e a t e a n e w A P I k e y f r o m h e r e :
h t t p s : / / w w w . d e l t a . e x c h a n g e / a p p / a c c o u n t / m a n a g e a p i k e y s
A P I K e y P e r m i s s i o n s
Y o u c a n r e s t r i c t t h e f u n c t i o n a l i t y o f A P I k e y s . B e f o r e c r e a t i n g t h e k e y , y o u m u s t c h o o s e w h a t p e r m i s s i o n s y o u w o u l d l i k e t h e k e y t o h a v e . T h e p e r m i s s i o n s a r e :
● T r a d i n g - A l l o w a k e y t o h a v e t r a d i n g p e r m i s s i o n s . T h i s i n c l u d e s p l a c i n g n e w o r d e r s , c a n c e l l i n g o r d e r s , c l o s i n g p o s i t i o n s , c h a n g i n g m a r g i n & l e v e r a g e .
● W i t h d r a w a l s - A l l o w s a k e y t o t r a n s f e r a s s e t s / c r y p t o c u r r e n c i e s o n b e h a l f o f a n a c c o u n t , i n c l u d i n g d e p o s i t s a n d w i t h d r a w s . E n a b l e w i t h c a u t i o n - A P I k e y t r a n s f e r s W I L L B Y P A S S t w o - f a c t o r a u t h e n t i c a t i o n .
C r e a t i n g a R e q u e s t
A l l A u t h e n t i c a t e d r e q u e s t s m u s t c o n t a i n t h e f o l l o w i n g h e a d e r s :
a p i - k e y : T h e a p i k e y a s a s t r i n g .
s i g n a t u r e : T h e h e x - e n c o d e d s i g n a t u r e ( s e e S i g n i n g a M e s s a g e ) .
t i m e s t a m p : A t i m e s t a m p f o r y o u r r e q u e s t .
A l l r e q u e s t b o d i e s s h o u l d h a v e c o n t e n t t y p e a p p l i c a t i o n / j s o n a n d b e v a l i d J S O N .
S i g n i n g a M e s s a g e
T h e s i g n a t u r e h e a d e r i s g e n e r a t e d b y c r e a t i n g a s h a 2 5 6 H M A C u s i n g t h e s e c r e t k e y o n t h e p r e h a s h s t r i n g m e t h o d + t i m e s t a m p + r e q u e s t P a t h + q u e r y p a r a m s + b o d y ( w h e r e + r e p r e s e n t s s t r i n g c o n c a t e n a t i o n ) a n d c o n v e r t o u t p u t t o h e x d i g e s t . T h e t i m e s t a m p v a l u e i s t h e s a m e a s t h e ' t i m e s t a m p ' h e a d e r .
C o d e s a m p l e s
# GET /orders
# queryString: product_id=1&state=open
# Generating signature:
echo -n "GET1542110948/orders?product_id=1&state=open" | openssl dgst -sha256 -hmac "7b6f39dcf660ec1c7c664f612c60410a2bd0c258416b498bf0311f94228f"
# Sample Request:
# Url:
# /orders?product_id=1&state=open
# Headers:
# signature: ad767fead0bdbe91ba1e4feb142079245fecd66aa5e47a70b40ba1a4c9b4e3db
# api-key: a207900b7693435a8fa9230a38195d
#timestamp: 1542110948
import hashlib
import hmac
import base64
import requests
import datetime
api_key = 'a207900b7693435a8fa9230a38195d'
api_secret = '7b6f39dcf660ec1c7c664f612c60410a2bd0c258416b498bf0311f94228f'
def generate_signature ( secret , message ):
message = bytes ( message , 'utf-8' )
secret = bytes ( secret , 'utf-8' )
hash = hmac . new ( secret , message , hashlib . sha256 )
return hash . hexdigest ()
def get_time_stamp ():
d = datetime . datetime . utcnow ()
epoch = datetime . datetime ( 1970 , 1 , 1 )
return str ( int (( d - epoch ) . total_seconds ()))
url = "https://testnet-api.delta.exchange/orders"
# Get open orders
payload = ''
method = 'GET'
timestamp = get_time_stamp ()
path = '/orders'
query_string = '?product_id=1&state=open'
signature_data = method + timestamp + path + query_string + payload
signature = generate_signature ( api_secret , signature_data )
req_headers = {
'api-key' : api_key ,
'timestamp' : timestamp ,
'signature' : signature ,
'User-Agent' : 'rest-client' ,
'Content-Type' : 'application/json'
}
query = { "product_id" : 1 , "state" : 'open' }
response = requests . request (
method , url , data = payload , params = query , timeout = ( 3 , 27 ), headers = req_headers
)
# Place new order
method = 'POST'
timestamp = get_time_stamp ()
path = '/orders'
query_string = ''
payload = "{ \" order_type \" : \" limit_order \" , \" size \" :3, \" side \" : \" buy \" , \" limit_price \" : \" 0.0005 \" , \" product_id \" :16}"
signature_data = method + timestamp + path + query_string + payload
signature = generate_signature ( api_secret , signature_data )
req_headers = {
'api-key' : api_key ,
'timestamp' : timestamp ,
'signature' : signature ,
'User-Agent' : 'rest-client' ,
'Content-Type' : 'application/json'
}
response = requests . request (
method , url , data = payload , params = {}, timeout = ( 3 , 27 ), headers = req_headers
)
R a t e L i m i t s
W h e n a r a t e l i m i t i s e x c e e d e d , a s t a t u s o f 4 2 9 T o o M a n y R e q u e s t s w i l l b e r e t u r n e d .
' X - R A T E - L I M I T - R E S E T ' i s r e t u r n e d i n r e s p o n s e h e a d e r w i t h t i m e l e f t i n m i l i s e c o n d
a f t e r w h i c h n e x t A P I r e q u e s t c a n b e h i t .
W e t h r o t t l e u n a u t h e n t i c a t e d a p i r e q u e s t s b y I P a n d a u t h e n t i c a t e d r e q u e s t s b y u s e r I D .
D e f a u l t Q u o t a i s 1 0 0 0 0 f o r a f i x e d 5 m i n u t e w i n d o w .
R E S T A P I C o s t S t r u c t u r e
E v e r y r e s t e n d p o i n t h a s b e e n a s s i g n e d a c o s t ( w e i g h t ) . W h e n y o u m a k e a n a p i c a l l , t h e c o s t i n c u r r e d i s d e d u c t e d f r o m y o u r 5 m i n q u o t a . S o , A p i s r e l a t e d t o r e a d i n g p u b l i c d a t a a r e c h e a p e r w h e r e a s A p i s r e l a t e d t o w r i t i n g p r i v a t e d a t a ( l i k e p l a c i n g a n o r d e r ) a r e t h e c o s t l i e s t .
H e r e i s t h e c o s t s t r u c t u r e f o r v a r i o u s e n d p o i n t s . P l e a s e n o t e t h a t a n y e n d p o i n t n o t m e n t i o n e d h e r e h a s a c o s t o f 1 u n i t .
Cost Slab
API Endpoints
3
Get Products, Get Orderbook, Get Tickers, Get Open Orders, Get Open Postions, Get Balances, OHLC Candles
5
Place/Edit/Delete Order, Add Position Margin
10
Get Order History, Get Fills, Get Txn Logs
25
Batch Order Apis
I n c r e a s i n g y o u r r a t e l i m i t s
I f y o u a r e r u n n i n g u p a g a i n s t o u r l i m i t s a n d b e l i e v e t h a t y o u h a v e a l e g i t i m a t e n e e d , p l e a s e e m a i l u s a t [ e m a i l p r o t e c t e d ] t o d i s c u s s i n c r e a s i n g y o u r r a t e l i m i t s .
T y p e s
T i m e s t a m p s
U n l e s s o t h e r w i s e s p e c i f i e d , a l l t i m e s t a m p s f r o m A P I a r e r e t u r n e d i n I S O 8 6 0 1 w i t h m i c r o s e c o n d s . M a k e s u r e y o u c a n p a r s e t h e f o l l o w i n g I S O 8 6 0 1 f o r m a t . M o s t m o d e r n l a n g u a g e s a n d l i b r a r i e s w i l l h a n d l e t h i s w i t h o u t i s s u e s .
2019-09-18T10:41:20Z
N u m b e r s
B i g D e c i m a l n u m b e r s a r e r e t u r n e d a s s t r i n g s t o s a v e f u l l p r e c i s i o n . W h e n m a k i n g a A P I r e q u e s t , i t i s s u g g e s t e d t o c o n v e r t n u m b e r s t o s t r i n g s t o a v o i d t r u n c a t i o n a n d p r e c i s i o n e r r o r s .
e . g . L i m i t p r i c e , s t o p l o s s p r i c e , t r a i l _ a m o u n t
I n t e g e r n u m b e r s ( l i k e c o n t r a c t s i z e , p r o d u c t _ i d a n d i m p a c t s i z e ) a r e u n q u o t e d .
I D s
M o s t i d e n t i f i e r s a r e U U I D u n l e s s o t h e r w i s e s p e c i f i e d . W h e n m a k i n g a r e q u e s t w h i c h r e q u i r e s a U U I D , b o t h f o r m s ( w i t h a n d w i t h o u t d a s h e s ) a r e a c c e p t e d .
1 6 7 j a 7 c g - 6 7 8 e - 6 8 7 6 - d 6 g 3 - f 8 0 3 c e 4 9 q s c 9 or 1 6 7 j a 7 c g 6 7 8 e 6 8 7 6 d 6 g 3 f 8 0 3 c e 4 9 q s c 9
T o e n s u r e t h a t y o u a r e e f f e c t i v e l y u s i n g t h e a p i , w e e n c o u r a g e y o u t o g o t h r o u g h t h i s s e c t i o n .
(一) A l l r e s p o n s e s c o m i n g f r o m t h e s e r v e r , e i t h e r f r o m r e s t a p i o r s o c k e t r p c c a l l s w i l l h a v e t h e f o l l o w i n g s u c c e s s a n d e r r o r f o r m a t s .
(二) A l l t i m e s t a m p s r e p o r t e d i n t h e a p i s w i l l b e i n m i c r o s e c o n d s
(三) A l l b i g d e c i m a l v a l u e s a r e s e n t a s s t r i n g
// Success format
{
success: true,
result: ..., // response body
meta: { // response meta - like pagination info
...
}
}
// Error format
{
success: false,
error: {
code: ..., // standard error code
context: { // extra context data to explain the cause of error
...
}
}
}
T h i s s e c t i o n d o c u m e n t s t h e l a t e s t ( v 2 ) a p i f o r t r a d i n g o n D e l t a E x c h a n g e . T h e R E S T A P I h a s e n d p o i n t s f o r a c c o u n t a n d o r d e r m a n a g e m e n t a s w e l l a s p u b l i c m a r k e t d a t a .
I f y o u a r e l o o k i n g f o r t h e o l d a p i d o c u m e n t a t i o n , h e r e i s t h e l i n k t o v 1 a p i d o c s ( n o w d e p r e c a t e d ) .
R E S T A P I E N D P O I N T U R L
● P r o d u c t i o n - h t t p s : / / a p i . d e l t a . e x c h a n g e / v 2
● T e s t n e t - h t t p s : / / t e s t n e t - a p i . d e l t a . e x c h a n g e / v 2
A s s e t s
G e t A s s e t L i s t
G e t l i s t o f a l l a s s e t s
C o d e s a m p l e s
import requests
headers = {
'Accept' : 'application/json' ,
'api-key' : '****' ,
'signature' : '****' ,
'timestamp' : '****'
}
r = requests . get ( 'https://api.delta.exchange/v2/assets' , params = {
}, headers = headers )
print r . json ()
# You can also use wget
curl -X GET https://api.delta.exchange/v2/assets \
-H 'Accept: application/json' \
-H 'api-key: ****' \
-H 'signature: ****' \
-H 'timestamp: ****'
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json' ,
'api-key' => '****' ,
'signature' => '****' ,
'timestamp' => '****'
}
result = RestClient . get 'https://api.delta.exchange/v2/assets' ,
params: {
}, headers: headers
p JSON . parse ( result )
G E T / a s s e t s
E x a m p l e r e s p o n s e s
2 0 0 R e s p o n s e
{
"success" : true ,
"result" : [
{
"id" : 0 ,
"symbol" : "string" ,
"precision" : 0 ,
"deposit_status" : "enabled" ,
"withdrawal_status" : "enabled" ,
"base_withdrawal_fee" : "string" ,
"min_withdrawal_amount" : "string"
}
]
}
R e s p o n s e s
Status
Meaning
Description
Schema
200
OK
List of all assets
Inline
R e s p o n s e S c h e m a
E n u m e r a t e d V a l u e s
Property
Value
deposit_status
enabled
deposit_status
disabled
withdrawal_status
enabled
withdrawal_status
disabled
T o p e r f o r m t h i s o p e r a t i o n , y o u m u s t b e s i g n t h e r e q u e s t u s i n g y o u r a p i k e y a n d s e c r e t . S e e A u t h e n t i c a t i o n s e c t i o n f o r m o r e d e t a i l s .
I n d i c e s
G e t I n d i c e s L i s t
G e t i n d i c e s
C o d e s a m p l e s
import requests
headers = {
'Accept' : 'application/json'
}
r = requests . get ( 'https://api.delta.exchange/v2/indices' , params = {
}, headers = headers )
print r . json ()
# You can also use wget
curl -X GET https://api.delta.exchange/v2/indices \
-H 'Accept: application/json'
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient . get 'https://api.delta.exchange/v2/indices' ,
params: {
}, headers: headers
p JSON . parse ( result )
G E T / i n d i c e s
E x a m p l e r e s p o n s e s
2 0 0 R e s p o n s e
{
"success" : true ,
"result" : [
{
"id" : 0 ,
"symbol" : "string" ,
"constituent_exchanges" : [
{}
],
"underlying_asset_id" : 0 ,
"quoting_asset_id" : 0 ,
"index_type" : "spot_pair"
}
]
}
R e s p o n s e s
Status
Meaning
Description
Schema
200
OK
List of indices (Spot underlyings, Interest Rates indexes)
Inline
R e s p o n s e S c h e m a
E n u m e r a t e d V a l u e s
Property
Value
index_type
spot_pair
index_type
fixed_interest_rate
index_type
floating_interest_rate
T h i s o p e r a t i o n d o e s n o t r e q u i r e a u t h e n t i c a t i o n .
P r o d u c t s
G e t P r o d u c t L i s t
G e t l i s t o f p r o d u c t s
C o d e s a m p l e s
import requests
headers = {
'Accept' : 'application/json'
}
r = requests . get ( 'https://api.delta.exchange/v2/products' , params = {
}, headers = headers )
print r . json ()
# You can also use wget
curl -X GET https://api.delta.exchange/v2/products \
-H 'Accept: application/json'
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient . get 'https://api.delta.exchange/v2/products' ,
params: {
}, headers: headers
p JSON . parse ( result )
G E T / p r o d u c t s
P a r a m e t e r s
Parameter
In
Type
Required
Description
contract_types
query
string
false
Comma separated list of contract types
states
query
string
false
Comma separated list of states e.g. to get expired contracts https://api.delta.exchange/v2/products?contract_types=call_options&states=expired
after
query
string
false
after cursor for paginated request
before
query
string
false
before cursor for paginated request
page_size
query
string
false
size of a single page for paginated request, default: 100
E x a m p l e r e s p o n s e s
2 0 0 R e s p o n s e
{
"success" : true ,
"result" : [
{
"id" : 0 ,
"symbol" : "string" ,
"description" : "string" ,
"created_at" : "string" ,
"updated_at" : "string" ,
"settlement_time" : "string" ,
"notional_type" : "vanilla" ,
"impact_size" : 0 ,
"initial_margin" : 0 ,
"maintenance_margin" : "string" ,
"contract_value" : "string" ,
"contract_unit_currency" : "string" ,
"tick_size" : "string" ,
"product_specs" : {},
"state" : "live" ,
"trading_status" : "operational" ,
"max_leverage_notional" : "string" ,
"default_leverage" : "string" ,
"initial_margin_scaling_factor" : "string" ,
"maintenance_margin_scaling_factor" : "string" ,
"taker_commission_rate" : "string" ,
"maker_commission_rate" : "string" ,
"liquidation_penalty_factor" : "string" ,
"contract_type" : "string" ,
"position_size_limit" : 0 ,
"basis_factor_max_limit" : "string" ,
"is_quanto" : true ,
"funding_method" : "string" ,
"annualized_funding" : "string" ,
"price_band" : "string" ,
"underlying_asset" : {
"id" : 0 ,
"symbol" : "string" ,
"precision" : 0 ,
"deposit_status" : "enabled" ,
"withdrawal_status" : "enabled" ,
"base_withdrawal_fee" : "string" ,
"min_withdrawal_amount" : "string"
},
"quoting_asset" : {
"id" : 0 ,
"symbol" : "string" ,
"precision" : 0 ,
"deposit_status" : "enabled" ,
"withdrawal_status" : "enabled" ,
"base_withdrawal_fee" : "string" ,
"min_withdrawal_amount" : "string"
},
"settling_asset" : {
"id" : 0 ,
"symbol" : "string" ,
"precision" : 0 ,
"deposit_status" : "enabled" ,
"withdrawal_status" : "enabled" ,
"base_withdrawal_fee" : "string" ,
"min_withdrawal_amount" : "string"
},
"spot_index" : {
"id" : 0 ,
"symbol" : "string" ,
"constituent_exchanges" : [
{}
],
"underlying_asset_id" : 0 ,
"quoting_asset_id" : 0 ,
"index_type" : "spot_pair"
}
}
]
}
R e s p o n s e s
Status
Meaning
Description
Schema
200
OK
List of products
Inline
R e s p o n s e S c h e m a
E n u m e r a t e d V a l u e s
Property
Value
notional_type
vanilla
notional_type
inverse
state
live
state
expired
state
upcoming
trading_status
operational
trading_status
disrupted_cancel_only
trading_status
disrupted_post_only
deposit_status
enabled
deposit_status
disabled
withdrawal_status
enabled
withdrawal_status
disabled
index_type
spot_pair
index_type
fixed_interest_rate
index_type
floating_interest_rate
T h i s o p e r a t i o n d o e s n o t r e q u i r e a u t h e n t i c a t i o n .
G e t p r o d u c t b y s y m b o l
C o d e s a m p l e s
import requests
headers = {
'Accept' : 'application/json'
}
r = requests . get ( 'https://api.delta.exchange/v2/products/{symbol}' , params = {
}, headers = headers )
print r . json ()
# You can also use wget
curl -X GET https://api.delta.exchange/v2/products/{ symbol} \
-H 'Accept: application/json'
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient . get 'https://api.delta.exchange/v2/products/{symbol}' ,
params: {
}, headers: headers
p JSON . parse ( result )
G E T / p r o d u c t s / { s y m b o l }
P a r a m e t e r s
Parameter
In
Type
Required
Description
symbol
path
string
true
symbol of the desired product
E x a m p l e r e s p o n s e s
2 0 0 R e s p o n s e
{
"success" : true ,
"result" : {
"id" : 0 ,
"symbol" : "string" ,
"description" : "string" ,
"created_at" : "string" ,
"updated_at" : "string" ,
"settlement_time" : "string" ,
"notional_type" : "vanilla" ,
"impact_size" : 0 ,
"initial_margin" : 0 ,
"maintenance_margin" : "string" ,
"contract_value" : "string" ,
"contract_unit_currency" : "string" ,
"tick_size" : "string" ,
"product_specs" : {},
"state" : "live" ,
"trading_status" : "operational" ,
"max_leverage_notional" : "string" ,
"default_leverage" : "string" ,
"initial_margin_scaling_factor" : "string" ,
"maintenance_margin_scaling_factor" : "string" ,
"taker_commission_rate" : "string" ,
"maker_commission_rate" : "string" ,
"liquidation_penalty_factor" : "string" ,
"contract_type" : "string" ,
"position_size_limit" : 0 ,
"basis_factor_max_limit" : "string" ,
"is_quanto" : true ,
"funding_method" : "string" ,
"annualized_funding" : "string" ,
"price_band" : "string" ,
"underlying_asset" : {
"id" : 0 ,
"symbol" : "string" ,
"precision" : 0 ,
"deposit_status" : "enabled" ,
"withdrawal_status" : "enabled" ,
"base_withdrawal_fee" : "string" ,
"min_withdrawal_amount" : "string"
},
"quoting_asset" : {
"id" : 0 ,
"symbol" : "string" ,
"precision" : 0 ,
"deposit_status" : "enabled" ,
"withdrawal_status" : "enabled" ,
"base_withdrawal_fee" : "string" ,
"min_withdrawal_amount" : "string"
},
"settling_asset" : {
"id" : 0 ,
"symbol" : "string" ,
"precision" : 0 ,
"deposit_status" : "enabled" ,
"withdrawal_status" : "enabled" ,
"base_withdrawal_fee" : "string" ,
"min_withdrawal_amount" : "string"
},
"spot_index" : {
"id" : 0 ,
"symbol" : "string" ,
"constituent_exchanges" : [
{}
],
"underlying_asset_id" : 0 ,
"quoting_asset_id" : 0 ,
"index_type" : "spot_pair"
}
}
}
R e s p o n s e s
Status
Meaning
Description
Schema
200
OK
List of products
Inline
R e s p o n s e S c h e m a
E n u m e r a t e d V a l u e s
Property
Value
notional_type
vanilla
notional_type
inverse
state
live
state
expired
state
upcoming
trading_status
operational
trading_status
disrupted_cancel_only
trading_status
disrupted_post_only
deposit_status
enabled
deposit_status
disabled
withdrawal_status
enabled
withdrawal_status
disabled
index_type
spot_pair
index_type
fixed_interest_rate
index_type
floating_interest_rate
T h i s o p e r a t i o n d o e s n o t r e q u i r e a u t h e n t i c a t i o n .
G e t t i c k e r s f o r p r o d u c t s
C o d e s a m p l e s
import requests
headers = {
'Accept' : 'application/json'
}
r = requests . get ( 'https://api.delta.exchange/v2/tickers' , params = {
}, headers = headers )
print r . json ()
# You can also use wget
curl -X GET https://api.delta.exchange/v2/tickers \
-H 'Accept: application/json'
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient . get 'https://api.delta.exchange/v2/tickers' ,
params: {
}, headers: headers
p JSON . parse ( result )
G E T / t i c k e r s
P a r a m e t e r s
Parameter
In
Type
Required
Description
contract_types
query
string
false
Comma separated list of contract types
E x a m p l e r e s p o n s e s
2 0 0 R e s p o n s e
{
"success" : true ,
"result" : [
{
"close" : 0 ,
"contract_type" : "string" ,
"greeks" : {
"delta" : "string" ,
"gamma" : "string" ,
"rho" : "string" ,
"theta" : "string" ,
"vega" : "string"
},
"high" : 0 ,
"low" : 0 ,
"mark_price" : "string" ,
"mark_vol" : "string" ,
"oi" : "string" ,
"oi_value" : "string" ,
"oi_value_symbol" : "string" ,
"oi_value_usd" : "string" ,
"open" : 0 ,
"price_band" : {
"lower_limit" : "string" ,
"upper_limit" : "string"
},
"product_id" : 0 ,
"quotes" : {
"ask_iv" : "string" ,
"ask_size" : "string" ,
"best_ask" : "string" ,
"best_bid" : "string" ,
"bid_iv" : "string" ,
"bid_size" : "string"
},
"size" : 0 ,
"spot_price" : "string" ,
"strike_price" : "string" ,
"symbol" : "string" ,
"timestamp" : 0 ,
"turnover" : 0 ,
"turnover_symbol" : "string" ,
"turnover_usd" : 0 ,
"volume" : 0
}
]
}
R e s p o n s e s
Status
Meaning
Description
Schema
200
OK
List of live tickers for all products
Inline
R e s p o n s e S c h e m a
T h i s o p e r a t i o n d o e s n o t r e q u i r e a u t h e n t i c a t i o n .
G e t t i c k e r f o r a p r o d u c t b y s y m b o l
C o d e s a m p l e s
import requests
headers = {
'Accept' : 'application/json'
}
r = requests . get ( 'https://api.delta.exchange/v2/tickers/{symbol}' , params = {
}, headers = headers )
print r . json ()
# You can also use wget
curl -X GET https://api.delta.exchange/v2/tickers/{ symbol} \
-H 'Accept: application/json'
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient . get 'https://api.delta.exchange/v2/tickers/{symbol}' ,
params: {
}, headers: headers
p JSON . parse ( result )
G E T / t i c k e r s / { s y m b o l }
P a r a m e t e r s
Parameter
In
Type
Required
Description
symbol
path
string
true
symbol of the ticker
E x a m p l e r e s p o n s e s
2 0 0 R e s p o n s e
{
"success" : true ,
"result" : {
"close" : 0 ,
"contract_type" : "string" ,
"greeks" : {
"delta" : "string" ,
"gamma" : "string" ,
"rho" : "string" ,
"theta" : "string" ,
"vega" : "string"
},
"high" : 0 ,
"low" : 0 ,
"mark_price" : "string" ,
"mark_vol" : "string" ,
"oi" : "string" ,
"oi_value" : "string" ,
"oi_value_symbol" : "string" ,
"oi_value_usd" : "string" ,
"open" : 0 ,
"price_band" : {
"lower_limit" : "string" ,
"upper_limit" : "string"
},
"product_id" : 0 ,
"quotes" : {
"ask_iv" : "string" ,
"ask_size" : "string" ,
"best_ask" : "string" ,
"best_bid" : "string" ,
"bid_iv" : "string" ,
"bid_size" : "string"
},
"size" : 0 ,
"spot_price" : "string" ,
"strike_price" : "string" ,
"symbol" : "string" ,
"timestamp" : 0 ,
"turnover" : 0 ,
"turnover_symbol" : "string" ,
"turnover_usd" : 0 ,
"volume" : 0
}
}
R e s p o n s e s
Status
Meaning
Description
Schema
200
OK
ticker data for requested product
Inline
R e s p o n s e S c h e m a
T h i s o p e r a t i o n d o e s n o t r e q u i r e a u t h e n t i c a t i o n .
O r d e r s
P l a c i n g O r d e r s , C a n c e l l i n g O r d e r s , P l a c i n g b a t c h o r d e r s , C a n c e l l i n g b a t c h o r d e r s , G e t O p e n o r d e r s , C h a n g e O r d e r s L e v e r a g e
P l a c e O r d e r
C o d e s a m p l e s
import requests
headers = {
'Content-Type' : 'application/json' ,
'Accept' : 'application/json' ,
'api-key' : '****' ,
'signature' : '****' ,
'timestamp' : '****'
}
r = requests . post ( 'https://api.delta.exchange/v2/orders' , params = {
}, headers = headers )
print r . json ()
# You can also use wget
curl -X POST https://api.delta.exchange/v2/orders \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'api-key: ****' \
-H 'signature: ****' \
-H 'timestamp: ****'
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json' ,
'Accept' => 'application/json' ,
'api-key' => '****' ,
'signature' => '****' ,
'timestamp' => '****'
}
result = RestClient . post 'https://api.delta.exchange/v2/orders' ,
params: {
}, headers: headers
p JSON . parse ( result )
P O S T / o r d e r s
B o d y p a r a m e t e r
{
"product_id" : 0 ,
"limit_price" : "string" ,
"size" : 0 ,
"side" : "buy" ,
"order_type" : "limit_order" ,
"stop_order_type" : "stop_loss_order" ,
"stop_price" : "string" ,
"stop_trigger_method" : "mark_price" ,
"time_in_force" : "gtc" ,
"post_only" : "true" ,
"reduce_only" : "true" ,
"client_order_id" : "string"
}
P a r a m e t e r s
Parameter
In
Type
Required
Description
body
body
CreateOrderRequest
true
Order which needs to be created
E x a m p l e r e s p o n s e s
2 0 0 R e s p o n s e
{
"success" : true ,
"result" : {
"id" : "ashb1212" ,
"client_order_id" : "asbasa" ,
"product_id" : 27 ,
"product_symbol" : "BTCUSD" ,
"limit_price" : "9200" ,
"side" : "buy" ,
"size" : 100 ,
"unfilled_size" : 50 ,
"user_id" : 1 ,
"order_type" : "limit_order" ,
"state" : "open" ,
"created_at" : "..."
}
}
R e s p o n s e s
Status
Meaning
Description
Schema
200
OK
Returns back the order object with assigned id and latest state
Inline
400
Bad Request
Returns error if order could not be placed
ApiErrorResponse
R e s p o n s e S c h e m a
E n u m e r a t e d V a l u e s
Property
Value
side
buy
side
sell
order_type
limit_order
order_type
market_order
stop_order_type
stop_loss_order
close_on_trigger
false
close_on_trigger
true
state
open
state
pending
state
closed
state
cancelled
T o p e r f o r m t h i s o p e r a t i o n , y o u m u s t b e s i g n t h e r e q u e s t u s i n g y o u r a p i k e y a n d s e c r e t . S e e A u t h e n t i c a t i o n s e c t i o n f o r m o r e d e t a i l s .
C a n c e l O r d e r
C o d e s a m p l e s
import requests
headers = {
'Content-Type' : 'application/json' ,
'Accept' : 'application/json' ,
'api-key' : '****' ,
'signature' : '****' ,
'timestamp' : '****'
}
r = requests . delete ( 'https://api.delta.exchange/v2/orders' , params = {
}, headers = headers )
print r . json ()
# You can also use wget
curl -X DELETE https://api.delta.exchange/v2/orders \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'api-key: ****' \
-H 'signature: ****' \
-H 'timestamp: ****'
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json' ,
'Accept' => 'application/json' ,
'api-key' => '****' ,
'signature' => '****' ,
'timestamp' => '****'
}
result = RestClient . delete 'https://api.delta.exchange/v2/orders' ,
params: {
}, headers: headers
p JSON . parse ( result )
D E L E T E / o r d e r s
B o d y p a r a m e t e r
{
"id" : 0 ,
"product_id" : 0
}
P a r a m e t e r s
Parameter
In
Type
Required
Description
body
body
DeleteOrderRequest
true
Order which needs to be cancelled
E x a m p l e r e s p o n s e s
2 0 0 R e s p o n s e
{
"success" : true ,
"result" : {
"id" : "ashb1212" ,
"client_order_id" : "asbasa" ,
"product_id" : 27 ,
"product_symbol" : "BTCUSD" ,
"limit_price" : "9200" ,
"side" : "buy" ,
"size" : 100 ,
"unfilled_size" : 50 ,
"user_id" : 1 ,
"order_type" : "limit_order" ,
"state" : "open" ,
"created_at" : "..."
}
}
R e s p o n s e s
Status
Meaning
Description
Schema
200
OK
Returns back the order object
Inline
400
Bad Request
Returns error if order could not be cancelled
ApiErrorResponse
R e s p o n s e S c h e m a
E n u m e r a t e d V a l u e s
Property
Value
side
buy
side
sell
order_type
limit_order
order_type
market_order
stop_order_type
stop_loss_order
close_on_trigger
false
close_on_trigger
true
state
open
state
pending
state
closed
state
cancelled
T o p e r f o r m t h i s o p e r a t i o n , y o u m u s t b e s i g n t h e r e q u e s t u s i n g y o u r a p i k e y a n d s e c r e t . S e e A u t h e n t i c a t i o n s e c t i o n f o r m o r e d e t a i l s .
E d i t O r d e r
C o d e s a m p l e s
import requests
headers = {
'Content-Type' : 'application/json' ,
'Accept' : 'application/json' ,
'api-key' : '****' ,
'signature' : '****' ,
'timestamp' : '****'
}
r = requests . put ( 'https://api.delta.exchange/v2/orders' , params = {
}, headers = headers )
print r . json ()
# You can also use wget
curl -X PUT https://api.delta.exchange/v2/orders \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'api-key: ****' \
-H 'signature: ****' \
-H 'timestamp: ****'
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json' ,
'Accept' => 'application/json' ,
'api-key' => '****' ,
'signature' => '****' ,
'timestamp' => '****'
}
result = RestClient . put 'https://api.delta.exchange/v2/orders' ,
params: {
}, headers: headers
p JSON . parse ( result )
P U T / o r d e r s
B o d y p a r a m e t e r
{
"id" : 0 ,
"product_id" : 0 ,
"limit_price" : "string" ,
"size" : 0
}
P a r a m e t e r s
Parameter
In
Type
Required
Description
body
body
EditOrderRequest
true
Order which needs to be edited
E x a m p l e r e s p o n s e s
2 0 0 R e s p o n s e
{
"success" : true ,
"result" : {
"id" : "ashb1212" ,
"client_order_id" : "asbasa" ,
"product_id" : 27 ,
"product_symbol" : "BTCUSD" ,
"limit_price" : "9200" ,
"side" : "buy" ,
"size" : 100 ,
"unfilled_size" : 50 ,
"user_id" : 1 ,
"order_type" : "limit_order" ,
"state" : "open" ,
"created_at" : "..."
}
}
R e s p o n s e s
Status
Meaning
Description
Schema
200
OK
Returns back the order object with assigned id and latest state
Inline
400
Bad Request
Returns error if order could not be placed
ApiErrorResponse
R e s p o n s e S c h e m a
E n u m e r a t e d V a l u e s
Property
Value
side
buy
side
sell
order_type
limit_order
order_type
market_order
stop_order_type
stop_loss_order
close_on_trigger
false
close_on_trigger
true
state
open
state
pending
state
closed
state
cancelled
T o p e r f o r m t h i s o p e r a t i o n , y o u m u s t b e s i g n t h e r e q u e s t u s i n g y o u r a p i k e y a n d s e c r e t . S e e A u t h e n t i c a t i o n s e c t i o n f o r m o r e d e t a i l s .
G e t A c t i v e O r d e r s
C o d e s a m p l e s
import requests
headers = {
'Accept' : 'application/json' ,
'api-key' : '****' ,
'signature' : '****' ,
'timestamp' : '****'
}
r = requests . get ( 'https://api.delta.exchange/v2/orders' , params = {
}, headers = headers )
print r . json ()
# You can also use wget
curl -X GET https://api.delta.exchange/v2/orders \
-H 'Accept: application/json' \
-H 'api-key: ****' \
-H 'signature: ****' \
-H 'timestamp: ****'
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json' ,
'api-key' => '****' ,
'signature' => '****' ,
'timestamp' => '****'
}
result = RestClient . get 'https://api.delta.exchange/v2/orders' ,
params: {
}, headers: headers
p JSON . parse ( result )
G E T / o r d e r s
P a r a m e t e r s
Parameter
In
Type
Required
Description
product_ids
query
string
false
comma separated product ids
states
query
string
false
comma separated list of states - open,pending
contract_types
query
string
false
comma separated list of desired contract types, if not specified any parameters then, all the orders will be returned
order_types
query
string
false
comma separated order types
start_time
query
integer
false
from time in micro-seconds in epoc
end_time
query
integer
false
from time in micro-seconds in epoc
after
query
string
false
after cursor for pagination
before
query
string
false
before cursor for pagination
page_size
query
integer
false
number of records per page
E n u m e r a t e d V a l u e s
Parameter
Value
contract_types
futures
contract_types
perpetual_futures
contract_types
call_options
contract_types
put_options
order_types
market
order_types
limit
order_types
stop_market
order_types
stop_limit
order_types
all_stop
E x a m p l e r e s p o n s e s
2 0 0 R e s p o n s e
{
"success" : true ,
"result" : [
{
"id" : "ashb1212" ,
"client_order_id" : "asbasa" ,
"product_id" : 27 ,
"product_symbol" : "BTCUSD" ,
"limit_price" : "9200" ,
"side" : "buy" ,
"size" : 100 ,
"unfilled_size" : 50 ,
"user_id" : 1 ,
"order_type" : "limit_order" ,
"state" : "open" ,
"created_at" : "..."
}
],
"meta" : {
"after" : "string" ,
"before" : "string"
}
}
R e s p o n s e s
Status
Meaning
Description
Schema
200
OK
List of orders as per the query
Inline
R e s p o n s e S c h e m a
E n u m e r a t e d V a l u e s
Property
Value
side
buy
side
sell
order_type
limit_order
order_type
market_order
stop_order_type
stop_loss_order
close_on_trigger
false
close_on_trigger
true
state
open
state
pending
state
closed
state
cancelled
T o p e r f o r m t h i s o p e r a t i o n , y o u m u s t b e s i g n t h e r e q u e s t u s i n g y o u r a p i k e y a n d s e c r e t . S e e A u t h e n t i c a t i o n s e c t i o n f o r m o r e d e t a i l s .
C a n c e l a l l o p e n o r d e r s
C o d e s a m p l e s
import requests
headers = {
'Content-Type' : 'application/json' ,
'Accept' : 'application/json' ,
'api-key' : '****' ,
'signature' : '****' ,
'timestamp' : '****'
}
r = requests . delete ( 'https://api.delta.exchange/v2/orders/all' , params = {
}, headers = headers )
print r . json ()
# You can also use wget
curl -X DELETE https://api.delta.exchange/v2/orders/all \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'api-key: ****' \
-H 'signature: ****' \
-H 'timestamp: ****'
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json' ,
'Accept' => 'application/json' ,
'api-key' => '****' ,
'signature' => '****' ,
'timestamp' => '****'
}
result = RestClient . delete 'https://api.delta.exchange/v2/orders/all' ,
params: {
}, headers: headers
p JSON . parse ( result )
D E L E T E / o r d e r s / a l l
B o d y p a r a m e t e r
{
"product_id" : 0 ,
"contract_types" : "string" ,
"cancel_limit_orders" : "true" ,
"cancel_stop_orders" : "true"
}
P a r a m e t e r s
Parameter
In
Type
Required
Description
body
body
CancelAllFilterObject
false
Filters for selecting orders that needs to be cancelled
E x a m p l e r e s p o n s e s
2 0 0 R e s p o n s e
{
"success" : true
}
R e s p o n s e s
T o p e r f o r m t h i s o p e r a t i o n , y o u m u s t b e s i g n t h e r e q u e s t u s i n g y o u r a p i k e y a n d s e c r e t . S e e A u t h e n t i c a t i o n s e c t i o n f o r m o r e d e t a i l s .
C r e a t e b a t c h o r d e r s
C o d e s a m p l e s
import requests
headers = {
'Content-Type' : 'application/json' ,
'Accept' : 'application/json' ,
'api-key' : '****' ,
'signature' : '****' ,
'timestamp' : '****'
}
r = requests . post ( 'https://api.delta.exchange/v2/orders/batch' , params = {
}, headers = headers )
print r . json ()
# You can also use wget
curl -X POST https://api.delta.exchange/v2/orders/batch \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'api-key: ****' \
-H 'signature: ****' \
-H 'timestamp: ****'
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json' ,
'Accept' => 'application/json' ,
'api-key' => '****' ,
'signature' => '****' ,
'timestamp' => '****'
}
result = RestClient . post 'https://api.delta.exchange/v2/orders/batch' ,
params: {
}, headers: headers
p JSON . parse ( result )
P O S T / o r d e r s / b a t c h
B o d y p a r a m e t e r
{
"orders" : [
{
"product_id" : 0 ,
"limit_price" : "string" ,
"size" : 0 ,
"side" : "buy" ,
"order_type" : "limit_order" ,
"stop_order_type" : "stop_loss_order" ,
"stop_price" : "string" ,
"stop_trigger_method" : "mark_price" ,
"time_in_force" : "gtc" ,
"post_only" : "true" ,
"reduce_only" : "true" ,
"client_order_id" : "string"
}
],
"product_id" : 0
}
P a r a m e t e r s
Parameter
In
Type
Required
Description
body
body
object
true
Does not support time_in_force flag for orders, All orders in batch create are assumed to be gtc orders. batch create does not support stop orders, it support only limit orders
» orders
body
[CreateOrderRequest ]
false
[A create order object]
»» product_id
body
integer
true
none
»» limit_price
body
string
false
none
»» size
body
integer
false
none
»» side
body
string
false
side for which to place order
»» order_type
body
string
false
none
»» stop_order_type
body
string
false
none
»» stop_price
body
string
false
none
»» stop_trigger_method
body
string
false
none
»» time_in_force
body
string
false
none
»» post_only
body
string
false
none
»» reduce_only
body
string
false
none
»» client_order_id
body
string
false
none
» product_id
body
integer
false
none
E n u m e r a t e d V a l u e s
Parameter
Value
»» side
buy
»» side
sell
»» order_type
limit_order
»» order_type
market_order
»» stop_order_type
stop_loss_order
»» stop_order_type
take_profit_order
»» stop_trigger_method
mark_price
»» stop_trigger_method
last_traded_price
»» stop_trigger_method
spot_price
»» time_in_force
gtc
»» time_in_force
ioc
»» time_in_force
fok
»» post_only
true
»» post_only
false
»» reduce_only
true
»» reduce_only
false
E x a m p l e r e s p o n s e s
2 0 0 R e s p o n s e
{
"success" : true ,
"result" : [
{
"id" : "ashb1212" ,
"client_order_id" : "asbasa" ,
"product_id" : 27 ,
"product_symbol" : "BTCUSD" ,
"limit_price" : "9200" ,
"side" : "buy" ,
"size" : 100 ,
"unfilled_size" : 50 ,
"user_id" : 1 ,
"order_type" : "limit_order" ,
"state" : "open" ,
"created_at" : "..."
}
]
}
R e s p o n s e s
Status
Meaning
Description
Schema
200
OK
returns the orders placed
Inline
400
Bad Request
returns error if orders couldnt be placed
ApiErrorResponse
R e s p o n s e S c h e m a
E n u m e r a t e d V a l u e s
Property
Value
side
buy
side
sell
order_type
limit_order
order_type
market_order
stop_order_type
stop_loss_order
close_on_trigger
false
close_on_trigger
true
state
open
state
pending
state
closed
state
cancelled
T o p e r f o r m t h i s o p e r a t i o n , y o u m u s t b e s i g n t h e r e q u e s t u s i n g y o u r a p i k e y a n d s e c r e t . S e e A u t h e n t i c a t i o n s e c t i o n f o r m o r e d e t a i l s .
E d i t b a t c h o r d e r s
C o d e s a m p l e s
import requests
headers = {
'Content-Type' : 'application/json' ,
'Accept' : 'application/json' ,
'api-key' : '****' ,
'signature' : '****' ,
'timestamp' : '****'
}
r = requests . put ( 'https://api.delta.exchange/v2/orders/batch' , params = {
}, headers = headers )
print r . json ()
# You can also use wget
curl -X PUT https://api.delta.exchange/v2/orders/batch \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'api-key: ****' \
-H 'signature: ****' \
-H 'timestamp: ****'
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json' ,
'Accept' => 'application/json' ,
'api-key' => '****' ,
'signature' => '****' ,
'timestamp' => '****'
}
result = RestClient . put 'https://api.delta.exchange/v2/orders/batch' ,
params: {
}, headers: headers
p JSON . parse ( result )
P U T / o r d e r s / b a t c h
b a t c h o r d e r e d i t
B o d y p a r a m e t e r
{
"orders" : [
{
"id" : 0 ,
"product_id" : 0 ,
"limit_price" : "string" ,
"size" : 0
}
],
"product_id" : 0
}
P a r a m e t e r s
Parameter
In
Type
Required
Description
body
body
object
true
none
» orders
body
[EditOrderRequest ]
false
[edit order object]
»» id
body
integer
false
none
»» product_id
body
integer
false
none
»» limit_price
body
string
false
none
»» size
body
integer
false
total size after editing order
» product_id
body
integer
false
none
E x a m p l e r e s p o n s e s
2 0 0 R e s p o n s e
{
"success" : true ,
"result" : [
{
"id" : "ashb1212" ,
"client_order_id" : "asbasa" ,
"product_id" : 27 ,
"product_symbol" : "BTCUSD" ,
"limit_price" : "9200" ,
"side" : "buy" ,
"size" : 100 ,
"unfilled_size" : 50 ,
"user_id" : 1 ,
"order_type" : "limit_order" ,
"state" : "open" ,
"created_at" : "..."
}
]
}
R e s p o n s e s
R e s p o n s e S c h e m a
E n u m e r a t e d V a l u e s
Property
Value
side
buy
side
sell
order_type
limit_order
order_type
market_order
stop_order_type
stop_loss_order
close_on_trigger
false
close_on_trigger
true
state
open
state
pending
state
closed
state
cancelled
T o p e r f o r m t h i s o p e r a t i o n , y o u m u s t b e s i g n t h e r e q u e s t u s i n g y o u r a p i k e y a n d s e c r e t . S e e A u t h e n t i c a t i o n s e c t i o n f o r m o r e d e t a i l s .
D e l e l e b a t c h o r d e r s
C o d e s a m p l e s
import requests
headers = {
'Content-Type' : 'application/json' ,
'Accept' : 'application/json' ,
'api-key' : '****' ,
'signature' : '****' ,
'timestamp' : '****'
}
r = requests . delete ( 'https://api.delta.exchange/v2/orders/batch' , params = {
}, headers = headers )
print r . json ()
# You can also use wget
curl -X DELETE https://api.delta.exchange/v2/orders/batch \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'api-key: ****' \
-H 'signature: ****' \
-H 'timestamp: ****'
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json' ,
'Accept' => 'application/json' ,
'api-key' => '****' ,
'signature' => '****' ,
'timestamp' => '****'
}
result = RestClient . delete 'https://api.delta.exchange/v2/orders/batch' ,
params: {
}, headers: headers
p JSON . parse ( result )
D E L E T E / o r d e r s / b a t c h
B o d y p a r a m e t e r
{
"orders" : [
{
"id" : 0 ,
"product_id" : 0
}
],
"product_id" : 0
}
P a r a m e t e r s
Parameter
In
Type
Required
Description
body
body
object
true
none
» orders
body
[DeleteOrderRequest ]
false
[A delete order object]
»» id
body
integer
false
none
»» product_id
body
integer
false
none
» product_id
body
integer
false
none
E x a m p l e r e s p o n s e s
2 0 0 R e s p o n s e
{
"success" : true ,
"result" : [
{
"id" : "ashb1212" ,
"client_order_id" : "asbasa" ,
"product_id" : 27 ,
"product_symbol" : "BTCUSD" ,
"limit_price" : "9200" ,
"side" : "buy" ,
"size" : 100 ,
"unfilled_size" : 50 ,
"user_id" : 1 ,
"order_type" : "limit_order" ,
"state" : "open" ,
"created_at" : "..."
}
]
}
R e s p o n s e s
Status
Meaning
Description
Schema
200
OK
returns the orders deleted
Inline
400
Bad Request
returns error if orders couldnt be deleted
ApiErrorResponse
R e s p o n s e S c h e m a
E n u m e r a t e d V a l u e s
Property
Value
side
buy
side
sell
order_type
limit_order
order_type
market_order
stop_order_type
stop_loss_order
close_on_trigger
false
close_on_trigger
true
state
open
state
pending
state
closed
state
cancelled
T o p e r f o r m t h i s o p e r a t i o n , y o u m u s t b e s i g n t h e r e q u e s t u s i n g y o u r a p i k e y a n d s e c r e t . S e e A u t h e n t i c a t i o n s e c t i o n f o r m o r e d e t a i l s .
C h a n g e o r d e r l e v e r a g e
C o d e s a m p l e s
import requests
headers = {
'Content-Type' : 'application/json' ,
'Accept' : '*/*' ,
'api-key' : '****' ,
'signature' : '****' ,
'timestamp' : '****'
}
r = requests . post ( 'https://api.delta.exchange/v2/products/{product_id}/orders/leverage' , params = {
}, headers = headers )
print r . json ()
# You can also use wget
curl -X POST https://api.delta.exchange/v2/products/{ product_id} /orders/leverage \
-H 'Content-Type: application/json' \
-H 'Accept: */*' \
-H 'api-key: ****' \
-H 'signature: ****' \
-H 'timestamp: ****'
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json' ,
'Accept' => '*/*' ,
'api-key' => '****' ,
'signature' => '****' ,
'timestamp' => '****'
}
result = RestClient . post 'https://api.delta.exchange/v2/products/{product_id}/orders/leverage' ,
params: {
}, headers: headers
p JSON . parse ( result )
P O S T / p r o d u c t s / { p r o d u c t _ i d } / o r d e r s / l e v e r a g e
B o d y p a r a m e t e r
{
"leverage" : "string"
}
P a r a m e t e r s
Parameter
In
Type
Required
Description
product_id
path
integer
true
none
body
body
object
true
none
» leverage
body
string
true
none
E x a m p l e r e s p o n s e s
2 0 0 R e s p o n s e
R e s p o n s e s
Status
Meaning
Description
Schema
200
OK
returns the OrderLeverage object
Inline
400
Bad Request
Returns error if leverage couldnt be changed
ApiErrorResponse
R e s p o n s e S c h e m a
T o p e r f o r m t h i s o p e r a t i o n , y o u m u s t b e s i g n t h e r e q u e s t u s i n g y o u r a p i k e y a n d s e c r e t . S e e A u t h e n t i c a t i o n s e c t i o n f o r m o r e d e t a i l s .
G e t o r d e r l e v e r a g e
C o d e s a m p l e s
import requests
headers = {
'Accept' : '*/*' ,
'api-key' : '****' ,
'signature' : '****' ,
'timestamp' : '****'
}
r = requests . get ( 'https://api.delta.exchange/v2/products/{product_id}/orders/leverage' , params = {
}, headers = headers )
print r . json ()
# You can also use wget
curl -X GET https://api.delta.exchange/v2/products/{ product_id} /orders/leverage \
-H 'Accept: */*' \
-H 'api-key: ****' \
-H 'signature: ****' \
-H 'timestamp: ****'
require 'rest-client'
require 'json'
headers = {
'Accept' => '*/*' ,
'api-key' => '****' ,
'signature' => '****' ,
'timestamp' => '****'
}
result = RestClient . get 'https://api.delta.exchange/v2/products/{product_id}/orders/leverage' ,
params: {
}, headers: headers
p JSON . parse ( result )
G E T / p r o d u c t s / { p r o d u c t _ i d } / o r d e r s / l e v e r a g e
P a r a m e t e r s
Parameter
In
Type
Required
Description
product_id
path
integer
true
none
E x a m p l e r e s p o n s e s
2 0 0 R e s p o n s e
R e s p o n s e s
Status
Meaning
Description
Schema
200
OK
returns the OrderLeverage object
Inline
R e s p o n s e S c h e m a
T o p e r f o r m t h i s o p e r a t i o n , y o u m u s t b e s i g n t h e r e q u e s t u s i n g y o u r a p i k e y a n d s e c r e t . S e e A u t h e n t i c a t i o n s e c t i o n f o r m o r e d e t a i l s .
P o s i t i o n s
G e t O p e n p o s i t i o n s , C h a n g e P o s i t i o n M a r g i n , C l o s e P o s i t i o n , C l o s e A l l P o s i t i o n
G e t p o s i t i o n
C o d e s a m p l e s
import requests
headers = {
'Accept' : 'application/json' ,
'api-key' : '****' ,
'signature' : '****' ,
'timestamp' : '****'
}
r = requests . get ( 'https://api.delta.exchange/v2/positions' , params = {
'product_id' : '0'
}, headers = headers )
print r . json ()
# You can also use wget
curl -X GET https://api.delta.exchange/v2/positions?product_id= 0 \
-H 'Accept: application/json' \
-H 'api-key: ****' \
-H 'signature: ****' \
-H 'timestamp: ****'
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json' ,
'api-key' => '****' ,
'signature' => '****' ,
'timestamp' => '****'
}
result = RestClient . get 'https://api.delta.exchange/v2/positions' ,
params: {
'product_id' => 'integer'
}, headers: headers
p JSON . parse ( result )
G E T / p o s i t i o n s
P a r a m e t e r s
Parameter
In
Type
Required
Description
product_id
query
integer
true
id of the product
E x a m p l e r e s p o n s e s
2 0 0 R e s p o n s e
{
"success" : true ,
"result" : {
"size" : 0 ,
"entry_price" : "string"
}
}
R e s p o n s e s
Status
Meaning
Description
Schema
200
OK
Open position for the give product id
Inline
R e s p o n s e S c h e m a
T o p e r f o r m t h i s o p e r a t i o n , y o u m u s t b e s i g n t h e r e q u e s t u s i n g y o u r a p i k e y a n d s e c r e t . S e e A u t h e n t i c a t i o n s e c t i o n f o r m o r e d e t a i l s .
G e t m a r g i n e d p o s i t i o n s
C o d e s a m p l e s
import requests
headers = {
'Accept' : 'application/json' ,
'api-key' : '****' ,
'signature' : '****' ,
'timestamp' : '****'
}
r = requests . get ( 'https://api.delta.exchange/v2/positions/margined' , params = {
}, headers = headers )
print r . json ()
# You can also use wget
curl -X GET https://api.delta.exchange/v2/positions/margined \
-H 'Accept: application/json' \
-H 'api-key: ****' \
-H 'signature: ****' \
-H 'timestamp: ****'
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json' ,
'api-key' => '****' ,
'signature' => '****' ,
'timestamp' => '****'
}
result = RestClient . get 'https://api.delta.exchange/v2/positions/margined' ,
params: {
}, headers: headers
p JSON . parse ( result )
G E T / p o s i t i o n s / m a r g i n e d
P a r a m e t e r s
Parameter
In
Type
Required
Description
product_ids
query
string
false
comma separated product ids
contract_types
query
string
false
comma separated list of desired contract types, if not specified any parameters then, all the open positions will be returned
E n u m e r a t e d V a l u e s
Parameter
Value
contract_types
futures
contract_types
perpetual_futures
contract_types
call_options
contract_types
put_options
E x a m p l e r e s p o n s e s
2 0 0 R e s p o n s e
{
"success" : true ,
"result" : [
{
"user_id" : 0 ,
"size" : 0 ,
"entry_price" : "string" ,
"margin" : "string" ,
"liquidation_price" : "string" ,
"bankruptcy_price" : "string" ,
"adl_level" : 0 ,
"product_id" : 0 ,
"product_symbol" : "string" ,
"commission" : "string" ,
"realized_pnl" : "string" ,
"realized_funding" : "string"
}
]
}
R e s p o n s e s
Status
Meaning
Description
Schema
200
OK
List of all open positions
Inline
R e s p o n s e S c h e m a
T o p e r f o r m t h i s o p e r a t i o n , y o u m u s t b e s i g n t h e r e q u e s t u s i n g y o u r a p i k e y a n d s e c r e t . S e e A u t h e n t i c a t i o n s e c t i o n f o r m o r e d e t a i l s .
A d d / R e m o v e p o s i t i o n m a r g i n
C o d e s a m p l e s
import requests
headers = {
'Content-Type' : 'application/json' ,
'Accept' : 'application/json' ,
'api-key' : '****' ,
'signature' : '****' ,
'timestamp' : '****'
}
r = requests . post ( 'https://api.delta.exchange/v2/positions/change_margin' , params = {
}, headers = headers )
print r . json ()
# You can also use wget
curl -X POST https://api.delta.exchange/v2/positions/change_margin \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'api-key: ****' \
-H 'signature: ****' \
-H 'timestamp: ****'
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json' ,
'Accept' => 'application/json' ,
'api-key' => '****' ,
'signature' => '****' ,
'timestamp' => '****'
}
result = RestClient . post 'https://api.delta.exchange/v2/positions/change_margin' ,
params: {
}, headers: headers
p JSON . parse ( result )
P O S T / p o s i t i o n s / c h a n g e _ m a r g i n
B o d y p a r a m e t e r
{
"product_id" : 0 ,
"delta_margin" : "string"
}
P a r a m e t e r s
Parameter
In
Type
Required
Description
body
body
object
true
none
» product_id
body
integer
true
none
» delta_margin
body
string
true
Delta in the position margin, positive in case of adding margin & negative in case of removing margin
E x a m p l e r e s p o n s e s
2 0 0 R e s p o n s e
{
"success" : true ,
"result" : {
"user_id" : 0 ,
"size" : 0 ,
"entry_price" : "string" ,
"margin" : "string" ,
"liquidation_price" : "string" ,
"bankruptcy_price" : "string" ,
"adl_level" : 0 ,
"product_id" : 0 ,
"product_symbol" : "string" ,
"commission" : "string" ,
"realized_pnl" : "string" ,
"realized_funding" : "string"
}
}
R e s p o n s e s
Status
Meaning
Description
Schema
200
OK
returns the position object
Inline
400
Bad Request
Returns error if position margin could not be changed
ApiErrorResponse
R e s p o n s e S c h e m a
T o p e r f o r m t h i s o p e r a t i o n , y o u m u s t b e s i g n t h e r e q u e s t u s i n g y o u r a p i k e y a n d s e c r e t . S e e A u t h e n t i c a t i o n s e c t i o n f o r m o r e d e t a i l s .
C l o s e a l l p o s i t i o n s
C o d e s a m p l e s
import requests
headers = {
'Content-Type' : 'application/json' ,
'Accept' : 'application/json' ,
'api-key' : '****' ,
'signature' : '****' ,
'timestamp' : '****'
}
r = requests . post ( 'https://api.delta.exchange/v2/positions/close_all' , params = {
}, headers = headers )
print r . json ()
# You can also use wget
curl -X POST https://api.delta.exchange/v2/positions/close_all \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'api-key: ****' \
-H 'signature: ****' \
-H 'timestamp: ****'
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json' ,
'Accept' => 'application/json' ,
'api-key' => '****' ,
'signature' => '****' ,
'timestamp' => '****'
}
result = RestClient . post 'https://api.delta.exchange/v2/positions/close_all' ,
params: {
}, headers: headers
p JSON . parse ( result )
P O S T / p o s i t i o n s / c l o s e _ a l l
B o d y p a r a m e t e r
{
"close_all_portfolio" : true ,
"close_all_isolated" : true ,
"user_id" : 0
}
P a r a m e t e r s
Parameter
In
Type
Required
Description
body
body
object
true
none
» close_all_portfolio
body
boolean
true
none
» close_all_isolated
body
boolean
true
none
» user_id
body
integer
true
none
E x a m p l e r e s p o n s e s
2 0 0 R e s p o n s e
{
"success" : true
}
R e s p o n s e s
T o p e r f o r m t h i s o p e r a t i o n , y o u m u s t b e s i g n t h e r e q u e s t u s i n g y o u r a p i k e y a n d s e c r e t . S e e A u t h e n t i c a t i o n s e c t i o n f o r m o r e d e t a i l s .
T r a d e H i s t o r y
G e t O r d e r s H i s t o r y , G e t F i l l H i s t o r y
G e t o r d e r h i s t o r y ( c a n c e l l e d a n d c l o s e d )
C o d e s a m p l e s
import requests
headers = {
'Accept' : 'application/json' ,
'api-key' : '****' ,
'signature' : '****' ,
'timestamp' : '****'
}
r = requests . get ( 'https://api.delta.exchange/v2/orders/history' , params = {
}, headers = headers )
print r . json ()
# You can also use wget
curl -X GET https://api.delta.exchange/v2/orders/history \
-H 'Accept: application/json' \
-H 'api-key: ****' \
-H 'signature: ****' \
-H 'timestamp: ****'
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json' ,
'api-key' => '****' ,
'signature' => '****' ,
'timestamp' => '****'
}
result = RestClient . get 'https://api.delta.exchange/v2/orders/history' ,
params: {
}, headers: headers
p JSON . parse ( result )
G E T / o r d e r s / h i s t o r y
P a r a m e t e r s
Parameter
In
Type
Required
Description
product_ids
query
string
false
comma separated product ids
contract_types
query
string
false
comma separated list of desired contract types
order_types
query
string
false
comma separated order types
start_time
query
integer
false
from time in micro-seconds in epoc
end_time
query
integer
false
from time in micro-seconds in epoc
after
query
string
false
after cursor for pagination
before
query
string
false
before cursor for pagination
page_size
query
integer
false
number of records per page
E n u m e r a t e d V a l u e s
Parameter
Value
order_types
market
order_types
limit
order_types
stop_market
order_types
stop_limit
order_types
all_stop
E x a m p l e r e s p o n s e s
2 0 0 R e s p o n s e
{
"success" : true ,
"result" : [
{
"id" : "ashb1212" ,
"client_order_id" : "asbasa" ,
"product_id" : 27 ,
"product_symbol" : "BTCUSD" ,
"limit_price" : "9200" ,
"side" : "buy" ,
"size" : 100 ,
"unfilled_size" : 50 ,
"user_id" : 1 ,
"order_type" : "limit_order" ,
"state" : "open" ,
"created_at" : "..."
}
],
"meta" : {
"after" : "string" ,
"before" : "string"
}
}
R e s p o n s e s
Status
Meaning
Description
Schema
200
OK
List of closed and cancelled orders
Inline
R e s p o n s e S c h e m a
E n u m e r a t e d V a l u e s
Property
Value
side
buy
side
sell
order_type
limit_order
order_type
market_order
stop_order_type
stop_loss_order
close_on_trigger
false
close_on_trigger
true
state
open
state
pending
state
closed
state
cancelled
T o p e r f o r m t h i s o p e r a t i o n , y o u m u s t b e s i g n t h e r e q u e s t u s i n g y o u r a p i k e y a n d s e c r e t . S e e A u t h e n t i c a t i o n s e c t i o n f o r m o r e d e t a i l s .
G E T u s e r f i l l s b y f i l t e r s
C o d e s a m p l e s
import requests
headers = {
'Accept' : 'application/json'
}
r = requests . get ( 'https://api.delta.exchange/v2/fills' , params = {
}, headers = headers )
print r . json ()
# You can also use wget
curl -X GET https://api.delta.exchange/v2/fills \
-H 'Accept: application/json'
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient . get 'https://api.delta.exchange/v2/fills' ,
params: {
}, headers: headers
p JSON . parse ( result )
G E T / f i l l s
P a r a m e t e r s
Parameter
In
Type
Required
Description
product_ids
query
string
false
comma separated product ids
contract_types
query
string
false
comma separated list of desired contract types
start_time
query
integer
false
from time in micro-seconds in epoc
end_time
query
integer
false
from time in micro-seconds in epoc
after
query
string
false
after cursor for pagination
before
query
string
false
before cursor for pagination
page_size
query
integer
false
number of records per page
E x a m p l e r e s p o n s e s
2 0 0 R e s p o n s e
{
"success" : true ,
"result" : [
{
"id" : 0 ,
"size" : 0 ,
"side" : "buy" ,
"price" : "string" ,
"role" : "taker" ,
"commission" : "string" ,
"created_at" : "string" ,
"product_id" : 0 ,
"product_symbol" : "string"
}
],
"meta" : {
"after" : "string" ,
"before" : "string"
}
}
R e s p o n s e s
Status
Meaning
Description
Schema
200
OK
fills
Inline
R e s p o n s e S c h e m a
E n u m e r a t e d V a l u e s
Property
Value
side
buy
side
sell
role
taker
role
maker
T h i s o p e r a t i o n d o e s n o t r e q u i r e a u t h e n t i c a t i o n .
D o w n l o a d W a l l e t t r a n s a c t i o n s
C o d e s a m p l e s
import requests
headers = {
'api-key' : '****' ,
'signature' : '****' ,
'timestamp' : '****'
}
r = requests . get ( 'https://api.delta.exchange/v2/fills/history/download/csv' , params = {
}, headers = headers )
print r . json ()
# You can also use wget
curl -X GET https://api.delta.exchange/v2/fills/history/download/csv \
-H 'api-key: ****' \
-H 'signature: ****' \
-H 'timestamp: ****'
require 'rest-client'
require 'json'
headers = {
'api-key' => '****' ,
'signature' => '****' ,
'timestamp' => '****'
}
result = RestClient . get 'https://api.delta.exchange/v2/fills/history/download/csv' ,
params: {
}, headers: headers
p JSON . parse ( result )
G E T / f i l l s / h i s t o r y / d o w n l o a d / c s v
P a r a m e t e r s
Parameter
In
Type
Required
Description
product_ids
query
string
false
comma separated product ids
contract_types
query
string
false
comma separated list of desired contract types
start_time
query
integer
false
from time in micro-seconds in epoc
end_time
query
integer
false
from time in micro-seconds in epoc
R e s p o n s e s
Status
Meaning
Description
Schema
200
OK
csv of fills for the filter query
None
T o p e r f o r m t h i s o p e r a t i o n , y o u m u s t b e s i g n t h e r e q u e s t u s i n g y o u r a p i k e y a n d s e c r e t . S e e A u t h e n t i c a t i o n s e c t i o n f o r m o r e d e t a i l s .
O r d e r b o o k
L 2 O r d e r b o o k
G e t L 2 o r d e r b o o k
C o d e s a m p l e s
import requests
headers = {
'Accept' : 'application/json'
}
r = requests . get ( 'https://api.delta.exchange/v2/l2orderbook/{symbol}' , params = {
}, headers = headers )
print r . json ()
# You can also use wget
curl -X GET https://api.delta.exchange/v2/l2orderbook/{ symbol} \
-H 'Accept: application/json'
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient . get 'https://api.delta.exchange/v2/l2orderbook/{symbol}' ,
params: {
}, headers: headers
p JSON . parse ( result )
G E T / l 2 o r d e r b o o k / { s y m b o l }
P a r a m e t e r s
Parameter
In
Type
Required
Description
symbol
path
string
true
none
depth
query
integer
false
number of levels on each side
E x a m p l e r e s p o n s e s
2 0 0 R e s p o n s e
{
"success" : true ,
"result" : {
"buy" : [
{
"price" : "9187.5" ,
"size" : 205640
}
],
"sell" : [
{
"price" : "9188.0" ,
"size" : 113752
}
]
}
}
R e s p o n s e s
Status
Meaning
Description
Schema
200
OK
L2 orderbook for the product
Inline
R e s p o n s e S c h e m a
T h i s o p e r a t i o n d o e s n o t r e q u i r e a u t h e n t i c a t i o n .
T r a d e s
G e t T r a d e s o f a c o n t r a c t
G e t p u b l i c t r a d e s
C o d e s a m p l e s
import requests
headers = {
'Accept' : 'application/json'
}
r = requests . get ( 'https://api.delta.exchange/v2/trades/{symbol}' , params = {
}, headers = headers )
print r . json ()
# You can also use wget
curl -X GET https://api.delta.exchange/v2/trades/{ symbol} \
-H 'Accept: application/json'
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient . get 'https://api.delta.exchange/v2/trades/{symbol}' ,
params: {
}, headers: headers
p JSON . parse ( result )
G E T / t r a d e s / { s y m b o l }
P a r a m e t e r s
Parameter
In
Type
Required
Description
symbol
path
string
true
none
E x a m p l e r e s p o n s e s
2 0 0 R e s p o n s e
{
"success" : true ,
"result" : {
"trades" : [
{
"side" : "buy" ,
"size" : 0 ,
"price" : "string" ,
"timestamp" : 0
}
]
}
}
R e s p o n s e s
Status
Meaning
Description
Schema
200
OK
List of recent trades of the product
Inline
R e s p o n s e S c h e m a
E n u m e r a t e d V a l u e s
Property
Value
side
buy
side
sell
T h i s o p e r a t i o n d o e s n o t r e q u i r e a u t h e n t i c a t i o n .
W a l l e t
G e t b a l a n c e s , G e t t r a n s a c t i o n h i s t o r y
G e t W a l l e t B a l a n c e s
C o d e s a m p l e s
import requests
headers = {
'Accept' : 'application/json' ,
'api-key' : '****' ,
'signature' : '****' ,
'timestamp' : '****'
}
r = requests . get ( 'https://api.delta.exchange/v2/wallet/balances' , params = {
}, headers = headers )
print r . json ()
# You can also use wget
curl -X GET https://api.delta.exchange/v2/wallet/balances \
-H 'Accept: application/json' \
-H 'api-key: ****' \
-H 'signature: ****' \
-H 'timestamp: ****'
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json' ,
'api-key' => '****' ,
'signature' => '****' ,
'timestamp' => '****'
}
result = RestClient . get 'https://api.delta.exchange/v2/wallet/balances' ,
params: {
}, headers: headers
p JSON . parse ( result )
G E T / w a l l e t / b a l a n c e s
E x a m p l e r e s p o n s e s
2 0 0 R e s p o n s e
{
"success" : true ,
"result" : [
{
"balance" : "string" ,
"order_margin" : "string" ,
"position_margin" : "string" ,
"commission" : "string" ,
"available_balance" : "string" ,
"interest_credit" : "string" ,
"asset_id" : 0 ,
"asset_symbol" : "string"
}
]
}
R e s p o n s e s
Status
Meaning
Description
Schema
200
OK
List of wallets attached to the user account
Inline
R e s p o n s e S c h e m a
T o p e r f o r m t h i s o p e r a t i o n , y o u m u s t b e s i g n t h e r e q u e s t u s i n g y o u r a p i k e y a n d s e c r e t . S e e A u t h e n t i c a t i o n s e c t i o n f o r m o r e d e t a i l s .
G e t W a l l e t t r a n s a c t i o n s
C o d e s a m p l e s
import requests
headers = {
'Accept' : 'application/json' ,
'api-key' : '****' ,
'signature' : '****' ,
'timestamp' : '****'
}
r = requests . get ( 'https://api.delta.exchange/v2/wallet/transactions' , params = {
}, headers = headers )
print r . json ()
# You can also use wget
curl -X GET https://api.delta.exchange/v2/wallet/transactions \
-H 'Accept: application/json' \
-H 'api-key: ****' \
-H 'signature: ****' \
-H 'timestamp: ****'
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json' ,
'api-key' => '****' ,
'signature' => '****' ,
'timestamp' => '****'
}
result = RestClient . get 'https://api.delta.exchange/v2/wallet/transactions' ,
params: {
}, headers: headers
p JSON . parse ( result )
G E T / w a l l e t / t r a n s a c t i o n s
P a r a m e t e r s
Parameter
In
Type
Required
Description
asset_ids
query
integer
false
comma separated list of asset_ids for which to get txns logs
start_time
query
integer
false
from time in micro-seconds in epoc
end_time
query
integer
false
from time in micro-seconds in epoc
after
query
string
false
after cursor for pagination
before
query
string
false
before cursor for pagination
page_size
query
integer
false
number of records per page
E x a m p l e r e s p o n s e s
2 0 0 R e s p o n s e
{
"success" : true ,
"result" : [
{
"id" : 0 ,
"amount" : "string" ,
"balance" : "string" ,
"transaction_type" : "pnl" ,
"meta_data" : {},
"product_id" : 0 ,
"asset_id" : 0 ,
"asset_symbol" : 0 ,
"created_at" : "string"
}
],
"meta" : {
"after" : "string" ,
"before" : "string"
}
}
R e s p o n s e s
Status
Meaning
Description
Schema
200
OK
list of transactions for that wallet
Inline
R e s p o n s e S c h e m a
E n u m e r a t e d V a l u e s
Property
Value
transaction_type
pnl
transaction_type
deposit
transaction_type
withdrawal
transaction_type
commission
transaction_type
conversion
transaction_type
funding
transaction_type
withdrawal_cancellation
transaction_type
referral_bonus
transaction_type
commission_rebate
transaction_type
promo_credit
transaction_type
trading_credits
transaction_type
trading_credits_forfeited
transaction_type
trading_credits_paid
transaction_type
liquidation_fee
transaction_type
interest_credit
T o p e r f o r m t h i s o p e r a t i o n , y o u m u s t b e s i g n t h e r e q u e s t u s i n g y o u r a p i k e y a n d s e c r e t . S e e A u t h e n t i c a t i o n s e c t i o n f o r m o r e d e t a i l s .
D o w n l o a d W a l l e t t r a n s a c t i o n s
C o d e s a m p l e s
import requests
headers = {
'api-key' : '****' ,
'signature' : '****' ,
'timestamp' : '****'
}
r = requests . get ( 'https://api.delta.exchange/v2/wallet/transactions/download' , params = {
}, headers = headers )
print r . json ()
# You can also use wget
curl -X GET https://api.delta.exchange/v2/wallet/transactions/download \
-H 'api-key: ****' \
-H 'signature: ****' \
-H 'timestamp: ****'
require 'rest-client'
require 'json'
headers = {
'api-key' => '****' ,
'signature' => '****' ,
'timestamp' => '****'
}
result = RestClient . get 'https://api.delta.exchange/v2/wallet/transactions/download' ,
params: {
}, headers: headers
p JSON . parse ( result )
G E T / w a l l e t / t r a n s a c t i o n s / d o w n l o a d
P a r a m e t e r s
Parameter
In
Type
Required
Description
asset_ids
query
integer
false
comma separated list of asset_ids
start_time
query
integer
false
from time in micro-seconds in epoc
end_time
query
integer
false
from time in micro-seconds in epoc
after
query
string
false
after cursor for pagination
before
query
string
false
before cursor for pagination
page_size
query
integer
false
number of records per page
R e s p o n s e s
Status
Meaning
Description
Schema
200
OK
csv of transactions for that wallet
None
T o p e r f o r m t h i s o p e r a t i o n , y o u m u s t b e s i g n t h e r e q u e s t u s i n g y o u r a p i k e y a n d s e c r e t . S e e A u t h e n t i c a t i o n s e c t i o n f o r m o r e d e t a i l s .
O H L C C a n d l e s
G e t p r i c e d a t a
G E T o h l c c a n d l e s
C o d e s a m p l e s
import requests
headers = {
'Accept' : 'application/json'
}
r = requests . get ( 'https://api.delta.exchange/v2/history/candles' , params = {
'resolution' : '1m' , 'symbol' : 'string' , 'start' : '0' , 'end' : '0'
}, headers = headers )
print r . json ()
# You can also use wget
curl -X GET https://api.delta.exchange/v2/history/candles?resolution= 1m&symbol= string&start= 0&end= 0 \
-H 'Accept: application/json'
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient . get 'https://api.delta.exchange/v2/history/candles' ,
params: {
'resolution' => 'string' ,
'symbol' => 'string' ,
'start' => 'integer' ,
'end' => 'integer'
}, headers: headers
p JSON . parse ( result )
G E T / h i s t o r y / c a n d l e s
P a r a m e t e r s
Parameter
In
Type
Required
Description
resolution
query
string
true
none
symbol
query
string
true
product symbol needs to pass to get data, to get funding history in the same api pass symbol as FUNDING:${symbol} and for mark price MARK:${symbol}
start
query
integer
true
Start time
end
query
integer
true
End time
E n u m e r a t e d V a l u e s
Parameter
Value
resolution
1m
resolution
3m
resolution
5m
resolution
15m
resolution
30m
resolution
1h
resolution
2h
resolution
4h
resolution
6h
resolution
1d
resolution
7d
resolution
30d
resolution
1w
resolution
2w
E x a m p l e r e s p o n s e s
2 0 0 R e s p o n s e
{
"success" : true ,
"result" : [
{
"time" : 0 ,
"open" : 0 ,
"high" : 0 ,
"low" : 0 ,
"close" : 0 ,
"volume" : 0
}
]
}
R e s p o n s e s
Status
Meaning
Description
Schema
200
OK
ohlc
Inline
R e s p o n s e S c h e m a
T h i s o p e r a t i o n d o e s n o t r e q u i r e a u t h e n t i c a t i o n .
G E T p r o d u c t h i s t o r y s p a r k l i n e
C o d e s a m p l e s
import requests
headers = {
'Accept' : 'application/json'
}
r = requests . get ( 'https://api.delta.exchange/v2/history/sparklines' , params = {
'symbols' : 'string'
}, headers = headers )
print r . json ()
# You can also use wget
curl -X GET https://api.delta.exchange/v2/history/sparklines?symbols= string \
-H 'Accept: application/json'
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient . get 'https://api.delta.exchange/v2/history/sparklines' ,
params: {
'symbols' => 'string'
}, headers: headers
p JSON . parse ( result )
G E T / h i s t o r y / s p a r k l i n e s
P a r a m e t e r s
Parameter
In
Type
Required
Description
symbols
query
string
true
comma separated product symbols
E x a m p l e r e s p o n s e s
2 0 0 R e s p o n s e
{
"success" : true ,
"result" : {
"MARK:BTCUSD_31Oct" : [
[
1594214051 ,
0.00003826
],
[
1594214051 ,
0.00003826
]
],
"SPOT:BTCUSD_31Oct" : [
[
1594215270 ,
0.00003826
]
]
}
}
R e s p o n s e s
Status
Meaning
Description
Schema
200
OK
product history sparkline
Inline
R e s p o n s e S c h e m a
T h i s o p e r a t i o n d o e s n o t r e q u i r e a u t h e n t i c a t i o n .
S t a t s
G e t V o l u m e S t a t s
G e t v o l u m e s t a t s
C o d e s a m p l e s
import requests
headers = {
'Accept' : 'application/json'
}
r = requests . get ( 'https://api.delta.exchange/v2/stats' , params = {
}, headers = headers )
print r . json ()
# You can also use wget
curl -X GET https://api.delta.exchange/v2/stats \
-H 'Accept: application/json'
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient . get 'https://api.delta.exchange/v2/stats' ,
params: {
}, headers: headers
p JSON . parse ( result )
G E T / s t a t s
E x a m p l e r e s p o n s e s
2 0 0 R e s p o n s e
{
"success" : true ,
"result" : {
"last_30_days_volume" : 0 ,
"last_7_days_volume" : 0 ,
"total_volume" : 0
}
}
R e s p o n s e s
Status
Meaning
Description
Schema
200
OK
sum of turnover in the last 7 and 30 days along with Total Volume in the last 24 hours (in USD)
Inline
R e s p o n s e S c h e m a
T h i s o p e r a t i o n d o e s n o t r e q u i r e a u t h e n t i c a t i o n .
S c h e m a s
A p i S u c c e s s R e s p o n s e
{
"success" : true
}
P r o p e r t i e s
Name
Type
Required
Restrictions
Description
success
boolean
false
none
none
A p i E r r o r R e s p o n s e
{
"success" : false ,
"error" : {}
}
P r o p e r t i e s
Name
Type
Required
Restrictions
Description
success
boolean
false
none
none
error
object
false
none
none
I n d e x
{
"id" : 0 ,
"symbol" : "string" ,
"constituent_exchanges" : [
{}
],
"underlying_asset_id" : 0 ,
"quoting_asset_id" : 0 ,
"index_type" : "spot_pair"
}
P r o p e r t i e s
Name
Type
Required
Restrictions
Description
id
integer(int64)
false
none
none
symbol
string
false
none
none
constituent_exchanges
[object]
false
none
none
underlying_asset_id
integer
false
none
Asset ID for base symbol
quoting_asset_id
integer
false
none
Asset ID for quoting symbol
index_type
string
false
none
Type of index
E n u m e r a t e d V a l u e s
Property
Value
index_type
spot_pair
index_type
fixed_interest_rate
index_type
floating_interest_rate
A r r a y O f I n d i c e s
[
{
"id" : 0 ,
"symbol" : "string" ,
"constituent_exchanges" : [
{}
],
"underlying_asset_id" : 0 ,
"quoting_asset_id" : 0 ,
"index_type" : "spot_pair"
}
]
P r o p e r t i e s
Name
Type
Required
Restrictions
Description
anonymous
[Index ]
false
none
none
A s s e t
{
"id" : 0 ,
"symbol" : "string" ,
"precision" : 0 ,
"deposit_status" : "enabled" ,
"withdrawal_status" : "enabled" ,
"base_withdrawal_fee" : "string" ,
"min_withdrawal_amount" : "string"
}
P r o p e r t i e s
Name
Type
Required
Restrictions
Description
id
integer(int64)
false
none
none
symbol
string
false
none
none
precision
integer
false
none
none
deposit_status
string
false
none
none
withdrawal_status
string
false
none
none
base_withdrawal_fee
string
false
none
none
min_withdrawal_amount
string
false
none
Minimum value of allowed withdrawal
E n u m e r a t e d V a l u e s
Property
Value
deposit_status
enabled
deposit_status
disabled
withdrawal_status
enabled
withdrawal_status
disabled
A r r a y O f A s s e t s
[
{
"id" : 0 ,
"symbol" : "string" ,
"precision" : 0 ,
"deposit_status" : "enabled" ,
"withdrawal_status" : "enabled" ,
"base_withdrawal_fee" : "string" ,
"min_withdrawal_amount" : "string"
}
]
P r o p e r t i e s
Name
Type
Required
Restrictions
Description
anonymous
[Asset ]
false
none
none
P r o d u c t
{
"id" : 0 ,
"symbol" : "string" ,
"description" : "string" ,
"created_at" : "string" ,
"updated_at" : "string" ,
"settlement_time" : "string" ,
"notional_type" : "vanilla" ,
"impact_size" : 0 ,
"initial_margin" : 0 ,
"maintenance_margin" : "string" ,
"contract_value" : "string" ,
"contract_unit_currency" : "string" ,
"tick_size" : "string" ,
"product_specs" : {},
"state" : "live" ,
"trading_status" : "operational" ,
"max_leverage_notional" : "string" ,
"default_leverage" : "string" ,
"initial_margin_scaling_factor" : "string" ,
"maintenance_margin_scaling_factor" : "string" ,
"taker_commission_rate" : "string" ,
"maker_commission_rate" : "string" ,
"liquidation_penalty_factor" : "string" ,
"contract_type" : "string" ,
"position_size_limit" : 0 ,
"basis_factor_max_limit" : "string" ,
"is_quanto" : true ,
"funding_method" : "string" ,
"annualized_funding" : "string" ,
"price_band" : "string" ,
"underlying_asset" : {
"id" : 0 ,
"symbol" : "string" ,
"precision" : 0 ,
"deposit_status" : "enabled" ,
"withdrawal_status" : "enabled" ,
"base_withdrawal_fee" : "string" ,
"min_withdrawal_amount" : "string"
},
"quoting_asset" : {
"id" : 0 ,
"symbol" : "string" ,
"precision" : 0 ,
"deposit_status" : "enabled" ,
"withdrawal_status" : "enabled" ,
"base_withdrawal_fee" : "string" ,
"min_withdrawal_amount" : "string"
},
"settling_asset" : {
"id" : 0 ,
"symbol" : "string" ,
"precision" : 0 ,
"deposit_status" : "enabled" ,
"withdrawal_status" : "enabled" ,
"base_withdrawal_fee" : "string" ,
"min_withdrawal_amount" : "string"
},
"spot_index" : {
"id" : 0 ,
"symbol" : "string" ,
"constituent_exchanges" : [
{}
],
"underlying_asset_id" : 0 ,
"quoting_asset_id" : 0 ,
"index_type" : "spot_pair"
}
}
P r o p e r t i e s
Name
Type
Required
Restrictions
Description
id
integer(int64)
false
none
id of a product or a contract
symbol
string
false
none
symbol of a product or a contract e.g. LINKBTC, XRPUSDQ
description
string
false
none
description of a product or a contract
created_at
string
false
none
product/contract creation date and time
updated_at
string
false
none
product/contract update date and time
settlement_time
string
false
none
settlement Timestamp of futures contract
notional_type
string
false
none
whether notional is calculated using vanilla math or inverse math
impact_size
integer
false
none
size of a typical trade. Used in the computation of mark price
initial_margin
integer
false
none
The amount required to enter into a new position
maintenance_margin
string
false
none
The amount necessary when a loss on a futures position requires you to allocate more funds to return the margin to the initial margin level.
contract_value
string
false
none
The notional value of a futures contract is simply the spot price of the asset multiplied by the amount of the asset specified in the contract
contract_unit_currency
string
false
none
This is the unit of 1 contract, for vanilla futures, its underlying asset. for inverse, it is settling asset. for quanto, its settling asset / quoting asset
tick_size
string
false
none
The minimum gap between 2 consecutive prices.
product_specs
object
false
none
Specs related to specific contract types (IRS indices, options volatility limits)
state
string
false
none
current state of the product
trading_status
string
false
none
trading status of the contract e.g. 'operational','disrupted_cancel_only' or 'disrupted_post_only'
max_leverage_notional
string
false
none
maximum notional position size (in settling asset terms) that can be acquired at highest allowed leverage for a given contract.
default_leverage
string
false
none
default leverage
initial_margin_scaling_factor
string
false
none
none
maintenance_margin_scaling_factor
string
false
none
none
taker_commission_rate
string
false
none
rate at which commission fee will be calculated for a taker trade in given contract
maker_commission_rate
string
false
none
rate at which maker rebate will be calculated
liquidation_penalty_factor
string
false
none
Determines liquidation charge as per the following formula: liquidation_penalty_factor * minimum maintenance margin
contract_type
string
false
none
Type of contracts e.g. futures, perpetual futures,
position_size_limit
integer
false
none
Maximum size of contracts in a single order can be placed
basis_factor_max_limit
string
false
none
Maximum allowed value of annualized basis
is_quanto
boolean
false
none
Flag which denotes whether future contract is quanto or not
funding_method
string
false
none
Method used to calculate funding for given contract. e.g. Fixed or mark price
annualized_funding
string
false
none
Maximum allowed value of funding, expressed as annual rate.
price_band
string
false
none
the range around mark price in which trading is allowed. This number is in percentage.
underlying_asset
Asset
false
none
none
quoting_asset
Asset
false
none
none
settling_asset
Asset
false
none
none
spot_index
Index
false
none
none
E n u m e r a t e d V a l u e s
Property
Value
notional_type
vanilla
notional_type
inverse
state
live
state
expired
state
upcoming
trading_status
operational
trading_status
disrupted_cancel_only
trading_status
disrupted_post_only
A r r a y O f P r o d u c t s
[
{
"id" : 0 ,
"symbol" : "string" ,
"description" : "string" ,
"created_at" : "string" ,
"updated_at" : "string" ,
"settlement_time" : "string" ,
"notional_type" : "vanilla" ,
"impact_size" : 0 ,
"initial_margin" : 0 ,
"maintenance_margin" : "string" ,
"contract_value" : "string" ,
"contract_unit_currency" : "string" ,
"tick_size" : "string" ,
"product_specs" : {},
"state" : "live" ,
"trading_status" : "operational" ,
"max_leverage_notional" : "string" ,
"default_leverage" : "string" ,
"initial_margin_scaling_factor" : "string" ,
"maintenance_margin_scaling_factor" : "string" ,
"taker_commission_rate" : "string" ,
"maker_commission_rate" : "string" ,
"liquidation_penalty_factor" : "string" ,
"contract_type" : "string" ,
"position_size_limit" : 0 ,
"basis_factor_max_limit" : "string" ,
"is_quanto" : true ,
"funding_method" : "string" ,
"annualized_funding" : "string" ,
"price_band" : "string" ,
"underlying_asset" : {
"id" : 0 ,
"symbol" : "string" ,
"precision" : 0 ,
"deposit_status" : "enabled" ,
"withdrawal_status" : "enabled" ,
"base_withdrawal_fee" : "string" ,
"min_withdrawal_amount" : "string"
},
"quoting_asset" : {
"id" : 0 ,
"symbol" : "string" ,
"precision" : 0 ,
"deposit_status" : "enabled" ,
"withdrawal_status" : "enabled" ,
"base_withdrawal_fee" : "string" ,
"min_withdrawal_amount" : "string"
},
"settling_asset" : {
"id" : 0 ,
"symbol" : "string" ,
"precision" : 0 ,
"deposit_status" : "enabled" ,
"withdrawal_status" : "enabled" ,
"base_withdrawal_fee" : "string" ,
"min_withdrawal_amount" : "string"
},
"spot_index" : {
"id" : 0 ,
"symbol" : "string" ,
"constituent_exchanges" : [
{}
],
"underlying_asset_id" : 0 ,
"quoting_asset_id" : 0 ,
"index_type" : "spot_pair"
}
}
]
P r o p e r t i e s
Name
Type
Required
Restrictions
Description
anonymous
[Product ]
false
none
none
O r d e r
{
"id" : "ashb1212" ,
"client_order_id" : "asbasa" ,
"product_id" : 27 ,
"product_symbol" : "BTCUSD" ,
"limit_price" : "9200" ,
"side" : "buy" ,
"size" : 100 ,
"unfilled_size" : 50 ,
"user_id" : 1 ,
"order_type" : "limit_order" ,
"state" : "open" ,
"created_at" : "..."
}
A n O r d e r o b j e c t
P r o p e r t i e s
Name
Type
Required
Restrictions
Description
id
integer
false
none
none
user_id
integer
false
none
none
size
integer
false
none
none
unfilled_size
integer
false
none
none
side
string
false
none
side for which to place order
order_type
string
false
none
none
limit_price
string
false
none
none
stop_order_type
string
false
none
none
stop_price
string
false
none
none
paid_commission
string
false
none
net commission paid for the order
close_on_trigger
string
false
none
none
client_order_id
string
false
none
client order id provided by the user while creating order
state
string
false
none
Order Status
created_at
string
false
none
none
product_id
integer
false
none
none
product_symbol
string
false
none
none
E n u m e r a t e d V a l u e s
Property
Value
side
buy
side
sell
order_type
limit_order
order_type
market_order
stop_order_type
stop_loss_order
close_on_trigger
false
close_on_trigger
true
state
open
state
pending
state
closed
state
cancelled
A r r a y O f O r d e r s
[
{
"id" : "ashb1212" ,
"client_order_id" : "asbasa" ,
"product_id" : 27 ,
"product_symbol" : "BTCUSD" ,
"limit_price" : "9200" ,
"side" : "buy" ,
"size" : 100 ,
"unfilled_size" : 50 ,
"user_id" : 1 ,
"order_type" : "limit_order" ,
"state" : "open" ,
"created_at" : "..."
}
]
P r o p e r t i e s
Name
Type
Required
Restrictions
Description
anonymous
[Order ]
false
none
[An Order object]
C r e a t e O r d e r R e q u e s t
{
"product_id" : 0 ,
"limit_price" : "string" ,
"size" : 0 ,
"side" : "buy" ,
"order_type" : "limit_order" ,
"stop_order_type" : "stop_loss_order" ,
"stop_price" : "string" ,
"stop_trigger_method" : "mark_price" ,
"time_in_force" : "gtc" ,
"post_only" : "true" ,
"reduce_only" : "true" ,
"client_order_id" : "string"
}
A c r e a t e o r d e r o b j e c t
P r o p e r t i e s
Name
Type
Required
Restrictions
Description
product_id
integer
true
none
none
limit_price
string
false
none
none
size
integer
false
none
none
side
string
false
none
side for which to place order
order_type
string
false
none
none
stop_order_type
string
false
none
none
stop_price
string
false
none
none
stop_trigger_method
string
false
none
none
time_in_force
string
false
none
none
post_only
string
false
none
none
reduce_only
string
false
none
none
client_order_id
string
false
none
none
E n u m e r a t e d V a l u e s
Property
Value
side
buy
side
sell
order_type
limit_order
order_type
market_order
stop_order_type
stop_loss_order
stop_order_type
take_profit_order
stop_trigger_method
mark_price
stop_trigger_method
last_traded_price
stop_trigger_method
spot_price
time_in_force
gtc
time_in_force
ioc
time_in_force
fok
post_only
true
post_only
false
reduce_only
true
reduce_only
false
A r r a y O f C r e a t e O r d e r R e q u e s t
[
{
"product_id" : 0 ,
"limit_price" : "string" ,
"size" : 0 ,
"side" : "buy" ,
"order_type" : "limit_order" ,
"stop_order_type" : "stop_loss_order" ,
"stop_price" : "string" ,
"stop_trigger_method" : "mark_price" ,
"time_in_force" : "gtc" ,
"post_only" : "true" ,
"reduce_only" : "true" ,
"client_order_id" : "string"
}
]
P r o p e r t i e s
Name
Type
Required
Restrictions
Description
anonymous
[CreateOrderRequest ]
false
none
[A create order object]
E d i t O r d e r R e q u e s t
{
"id" : 0 ,
"product_id" : 0 ,
"limit_price" : "string" ,
"size" : 0
}
e d i t o r d e r o b j e c t
P r o p e r t i e s
Name
Type
Required
Restrictions
Description
id
integer
false
none
none
product_id
integer
false
none
none
limit_price
string
false
none
none
size
integer
false
none
total size after editing order
A r r a y O f E d i t O r d e r R e q u e s t
[
{
"id" : 0 ,
"product_id" : 0 ,
"limit_price" : "string" ,
"size" : 0
}
]
P r o p e r t i e s
Name
Type
Required
Restrictions
Description
anonymous
[EditOrderRequest ]
false
none
[edit order object]
D e l e t e O r d e r R e q u e s t
{
"id" : 0 ,
"product_id" : 0
}
A d e l e t e o r d e r o b j e c t
P r o p e r t i e s
Name
Type
Required
Restrictions
Description
id
integer
false
none
none
product_id
integer
false
none
none
C a n c e l A l l F i l t e r O b j e c t
{
"product_id" : 0 ,
"contract_types" : "string" ,
"cancel_limit_orders" : "true" ,
"cancel_stop_orders" : "true"
}
C a n c e l a l l r e q u e s t f i l t e r o b j e c t
P r o p e r t i e s
Name
Type
Required
Restrictions
Description
product_id
integer
false
none
cancel all orders for particular product, cancels orders for all products if not provided
contract_types
string
false
none
comma separated list of desired contract types
cancel_limit_orders
string
false
none
set as true to cancel open limit orders
cancel_stop_orders
string
false
none
set as true to cancel stop orders
E n u m e r a t e d V a l u e s
Property
Value
cancel_limit_orders
true
cancel_limit_orders
false
cancel_stop_orders
true
cancel_stop_orders
false
A r r a y O f D e l e t e O r d e r R e q u e s t
[
{
"id" : 0 ,
"product_id" : 0
}
]
P r o p e r t i e s
Name
Type
Required
Restrictions
Description
anonymous
[DeleteOrderRequest ]
false
none
[A delete order object]
P o s i t i o n
{
"user_id" : 0 ,
"size" : 0 ,
"entry_price" : "string" ,
"margin" : "string" ,
"liquidation_price" : "string" ,
"bankruptcy_price" : "string" ,
"adl_level" : 0 ,
"product_id" : 0 ,
"product_symbol" : "string" ,
"commission" : "string" ,
"realized_pnl" : "string" ,
"realized_funding" : "string"
}
A p o s i t i o n o b j e c t
P r o p e r t i e s
Name
Type
Required
Restrictions
Description
user_id
integer
false
none
none
size
integer
false
none
Position size, negative for short and positive for long
entry_price
string
false
none
none
margin
string
false
none
none
liquidation_price
string
false
none
none
bankruptcy_price
string
false
none
none
adl_level
integer
false
none
none
product_id
integer
false
none
none
product_symbol
string
false
none
none
commission
string
false
none
commissions blocked in the position
realized_pnl
string
false
none
Net realized pnl since the position was opened
realized_funding
string
false
none
Net realized funding since the position was opened
A r r a y O f P o s i t i o n s
[
{
"user_id" : 0 ,
"size" : 0 ,
"entry_price" : "string" ,
"margin" : "string" ,
"liquidation_price" : "string" ,
"bankruptcy_price" : "string" ,
"adl_level" : 0 ,
"product_id" : 0 ,
"product_symbol" : "string" ,
"commission" : "string" ,
"realized_pnl" : "string" ,
"realized_funding" : "string"
}
]
P r o p e r t i e s
Name
Type
Required
Restrictions
Description
anonymous
[Position ]
false
none
[A position object]
F i l l
{
"id" : 0 ,
"size" : 0 ,
"side" : "buy" ,
"price" : "string" ,
"role" : "taker" ,
"commission" : "string" ,
"created_at" : "string" ,
"product_id" : 0 ,
"product_symbol" : "string"
}
A f i l l o b j e c t
P r o p e r t i e s
Name
Type
Required
Restrictions
Description
id
integer
false
none
none
size
integer
false
none
none
side
string
false
none
none
price
string
false
none
Price at which the fill happened, BigDecimal sent as string
role
string
false
none
none
commission
string
false
none
Commission paid on this fill, negative value means commission was earned because of maker role
created_at
string
false
none
none
product_id
integer
false
none
none
product_symbol
string
false
none
none
E n u m e r a t e d V a l u e s
Property
Value
side
buy
side
sell
role
taker
role
maker
A r r a y O f F i l l s
[
{
"id" : 0 ,
"size" : 0 ,
"side" : "buy" ,
"price" : "string" ,
"role" : "taker" ,
"commission" : "string" ,
"created_at" : "string" ,
"product_id" : 0 ,
"product_symbol" : "string"
}
]
P r o p e r t i e s
Name
Type
Required
Restrictions
Description
anonymous
[Fill ]
false
none
[A fill object]
O r d e r L e v e r a g e
{
"leverage" : "string" ,
"order_margin" : "string" ,
"product_id" : 0
}
O r d e r L e v e r a g e f o r a p r o d u c t
P r o p e r t i e s
Name
Type
Required
Restrictions
Description
leverage
string
false
none
Leverage of all open orders for this product
order_margin
string
false
none
Margin blocked in open orders for this product
product_id
integer
false
none
none
L 2 O r d e r b o o k
{
"buy" : [
{
"price" : "9187.5" ,
"size" : 205640
}
],
"sell" : [
{
"price" : "9188.0" ,
"size" : 113752
}
]
}
L 2 o r d e r b o o k
P r o p e r t i e s
Name
Type
Required
Restrictions
Description
buy
[object]
false
none
none
» price
string
false
none
none
» size
integer
false
none
none
sell
[object]
false
none
none
» price
string
false
none
none
» size
integer
false
none
none
T r a d e s
{
"trades" : [
{
"side" : "buy" ,
"size" : 0 ,
"price" : "string" ,
"timestamp" : 0
}
]
}
t r a d e s o f a s y m b o l
P r o p e r t i e s
Name
Type
Required
Restrictions
Description
trades
[object]
false
none
none
» side
string
false
none
none
» size
integer
false
none
none
» price
string
false
none
none
» timestamp
integer
false
none
none
E n u m e r a t e d V a l u e s
Property
Value
side
buy
side
sell
W a l l e t
{
"balance" : "string" ,
"order_margin" : "string" ,
"position_margin" : "string" ,
"commission" : "string" ,
"available_balance" : "string" ,
"interest_credit" : "string" ,
"asset_id" : 0 ,
"asset_symbol" : "string"
}
P r o p e r t i e s
Name
Type
Required
Restrictions
Description
balance
string
false
none
Total wallet balance
order_margin
string
false
none
Margin blocked in open orders
position_margin
string
false
none
Margin blocked in open positions
commission
string
false
none
Commissions blocked in open orders and open positions
available_balance
string
false
none
Amount available for withdrawals
interest_credit
string
false
none
Interest credit earned till now
asset_id
integer
false
none
none
asset_symbol
string
false
none
none
A r r a y O f W a l l e t s
[
{
"balance" : "string" ,
"order_margin" : "string" ,
"position_margin" : "string" ,
"commission" : "string" ,
"available_balance" : "string" ,
"interest_credit" : "string" ,
"asset_id" : 0 ,
"asset_symbol" : "string"
}
]
P r o p e r t i e s
Name
Type
Required
Restrictions
Description
anonymous
[Wallet ]
false
none
none
T r a n s a c t i o n
{
"id" : 0 ,
"amount" : "string" ,
"balance" : "string" ,
"transaction_type" : "pnl" ,
"meta_data" : {},
"product_id" : 0 ,
"asset_id" : 0 ,
"asset_symbol" : 0 ,
"created_at" : "string"
}
P r o p e r t i e s
Name
Type
Required
Restrictions
Description
id
integer
false
none
none
amount
string
false
none
amount credited/debited in this transaction (+ for credited, - for debited)
balance
string
false
none
net wallet balance after this transaction
transaction_type
string
false
none
none
meta_data
object
false
none
none
product_id
integer
false
none
none
asset_id
integer
false
none
none
asset_symbol
integer
false
none
none
created_at
string
false
none
none
E n u m e r a t e d V a l u e s
Property
Value
transaction_type
pnl
transaction_type
deposit
transaction_type
withdrawal
transaction_type
commission
transaction_type
conversion
transaction_type
funding
transaction_type
withdrawal_cancellation
transaction_type
referral_bonus
transaction_type
commission_rebate
transaction_type
promo_credit
transaction_type
trading_credits
transaction_type
trading_credits_forfeited
transaction_type
trading_credits_paid
transaction_type
liquidation_fee
transaction_type
interest_credit
A r r a y O f T r a n s a c t i o n s
[
{
"id" : 0 ,
"amount" : "string" ,
"balance" : "string" ,
"transaction_type" : "pnl" ,
"meta_data" : {},
"product_id" : 0 ,
"asset_id" : 0 ,
"asset_symbol" : 0 ,
"created_at" : "string"
}
]
P r o p e r t i e s
Name
Type
Required
Restrictions
Description
anonymous
[Transaction ]
false
none
none
g r e e k s
{
"delta" : "string" ,
"gamma" : "string" ,
"rho" : "string" ,
"theta" : "string" ,
"vega" : "string"
}
P r o p e r t i e s
Name
Type
Required
Restrictions
Description
delta
string
false
none
none
gamma
string
false
none
none
rho
string
false
none
none
theta
string
false
none
none
vega
string
false
none
none
p r i c e _ b a n d
{
"lower_limit" : "string" ,
"upper_limit" : "string"
}
P r o p e r t i e s
Name
Type
Required
Restrictions
Description
lower_limit
string
false
none
none
upper_limit
string
false
none
none
q u o t e s
{
"ask_iv" : "string" ,
"ask_size" : "string" ,
"best_ask" : "string" ,
"best_bid" : "string" ,
"bid_iv" : "string" ,
"bid_size" : "string"
}
P r o p e r t i e s
Name
Type
Required
Restrictions
Description
ask_iv
string
false
none
none
ask_size
string
false
none
none
best_ask
string
false
none
none
best_bid
string
false
none
none
bid_iv
string
false
none
none
bid_size
string
false
none
none
T i c k e r
{
"close" : 0 ,
"contract_type" : "string" ,
"greeks" : {
"delta" : "string" ,
"gamma" : "string" ,
"rho" : "string" ,
"theta" : "string" ,
"vega" : "string"
},
"high" : 0 ,
"low" : 0 ,
"mark_price" : "string" ,
"mark_vol" : "string" ,
"oi" : "string" ,
"oi_value" : "string" ,
"oi_value_symbol" : "string" ,
"oi_value_usd" : "string" ,
"open" : 0 ,
"price_band" : {
"lower_limit" : "string" ,
"upper_limit" : "string"
},
"product_id" : 0 ,
"quotes" : {
"ask_iv" : "string" ,
"ask_size" : "string" ,
"best_ask" : "string" ,
"best_bid" : "string" ,
"bid_iv" : "string" ,
"bid_size" : "string"
},
"size" : 0 ,
"spot_price" : "string" ,
"strike_price" : "string" ,
"symbol" : "string" ,
"timestamp" : 0 ,
"turnover" : 0 ,
"turnover_symbol" : "string" ,
"turnover_usd" : 0 ,
"volume" : 0
}
P r o p e r t i e s
Name
Type
Required
Restrictions
Description
close
integer
false
none
none
contract_type
string
false
none
none
greeks
greeks
false
none
none
high
number
false
none
none
low
number
false
none
none
mark_price
string
false
none
none
mark_vol
string
false
none
none
oi
string
false
none
none
oi_value
string
false
none
none
oi_value_symbol
string
false
none
none
oi_value_usd
string
false
none
none
open
number
false
none
none
price_band
price_band
false
none
none
product_id
number
false
none
none
quotes
quotes
false
none
none
size
number
false
none
none
spot_price
string
false
none
none
strike_price
string
false
none
none
symbol
string
false
none
none
timestamp
number
false
none
none
turnover
number
false
none
none
turnover_symbol
string
false
none
none
turnover_usd
number
false
none
none
volume
integer
false
none
none
A r r a y O f T i c k e r s
[
{
"close" : 0 ,
"contract_type" : "string" ,
"greeks" : {
"delta" : "string" ,
"gamma" : "string" ,
"rho" : "string" ,
"theta" : "string" ,
"vega" : "string"
},
"high" : 0 ,
"low" : 0 ,
"mark_price" : "string" ,
"mark_vol" : "string" ,
"oi" : "string" ,
"oi_value" : "string" ,
"oi_value_symbol" : "string" ,
"oi_value_usd" : "string" ,
"open" : 0 ,
"price_band" : {
"lower_limit" : "string" ,
"upper_limit" : "string"
},
"product_id" : 0 ,
"quotes" : {
"ask_iv" : "string" ,
"ask_size" : "string" ,
"best_ask" : "string" ,
"best_bid" : "string" ,
"bid_iv" : "string" ,
"bid_size" : "string"
},
"size" : 0 ,
"spot_price" : "string" ,
"strike_price" : "string" ,
"symbol" : "string" ,
"timestamp" : 0 ,
"turnover" : 0 ,
"turnover_symbol" : "string" ,
"turnover_usd" : 0 ,
"volume" : 0
}
]
P r o p e r t i e s
Name
Type
Required
Restrictions
Description
anonymous
[Ticker ]
false
none
none
{
"after" : "string" ,
"before" : "string"
}
P r o p e r t i e s
Name
Type
Required
Restrictions
Description
after
string
false
none
none
before
string
false
none
none
O H L C D a t a
{
"time" : 0 ,
"open" : 0 ,
"high" : 0 ,
"low" : 0 ,
"close" : 0 ,
"volume" : 0
}
A o h l c o b j e c t
P r o p e r t i e s
Name
Type
Required
Restrictions
Description
time
integer
false
none
none
open
number(float)
false
none
none
high
number
false
none
none
low
number
false
none
none
close
number
false
none
none
volume
number
false
none
none
A r r a y O f O H L C D a t a
[
{
"time" : 0 ,
"open" : 0 ,
"high" : 0 ,
"low" : 0 ,
"close" : 0 ,
"volume" : 0
}
]
P r o p e r t i e s
Name
Type
Required
Restrictions
Description
anonymous
[OHLCData ]
false
none
[A ohlc object]
S p a r k l i n e D a t a
{
"MARK:BTCUSD_31Oct" : [
[
1594214051 ,
0.00003826
],
[
1594214051 ,
0.00003826
]
],
"SPOT:BTCUSD_31Oct" : [
[
1594215270 ,
0.00003826
]
]
}
P r o p e r t i e s
Name
Type
Required
Restrictions
Description
additionalProperties
[integer]
false
none
array of timestamp and closing value
S t a t s
{
"last_30_days_volume" : 0 ,
"last_7_days_volume" : 0 ,
"total_volume" : 0
}
P r o p e r t i e s
Name
Type
Required
Restrictions
Description
last_30_days_volume
integer
false
none
sum of turnover usd in the last 30 days
last_7_days_volume
integer
false
none
sum of turnover usd in the last 7 days
total_volume
integer
false
none
sum of turnover usd in the last 24 hours
P l a c e o r d e r e r r o r s
T h i s s e c t i o n l i s t s v a r i o u s e r r o r s r e t u r n e d b y t h e s y s t e m w h i l e p l a c i n g o r d e r . T h e e r r o r f o r m a t l o o k s l i k e t h i s
{
success: false,
error: {
code: ..., // error code
context: {
...
}
}
}
H e r e i s a l i s t o f e r r o r c o d e s a n d t h e i r e x p l a n a t i o n
error code
description
insufficient_margin
Margin required to place order with selected leverage and quantity is insufficient.
order_size_exceed_available
Rhe order book doesn't have sufficient liquidity, hence the order couldnt be filled (for ex - ioc orders).
risk_limits_breached
orders couldn't be placed as it will breach allowed risk limits.
invalid_contract
The contract/product is either doesn\'t exist or has already expired.
immediate_liquidation
Order will cause immediate liquidation.
out_of_bankruptcy
Order prices are out of position bankruptcy limits.
self_matching_disrupted_post_only
Self matching is not allowed during auction.
immediate_execution_post_only
orders couldn't be placed as it includes post only orders which will be immediately executed.
E r r o r s
D e l t a A P I u s e s t h e f o l l o w i n g e r r o r c o d e s :
Error Code
Meaning
400
Bad Request -- Your request is invalid.
401
Unauthorized -- Your API key/Signature is wrong.
404
Not Found -- The specified resource could not be found.
405
Method Not Allowed -- You tried to access a resource with an invalid method.
406
Not Acceptable -- You requested a format that isn't json.
429
Too Many Requests -- You have exhausted your rate limits! Slow down!
500
Internal Server Error -- We had a problem with our server. Try again later.
503
Service Unavailable -- We're temporarily offline for maintenance. Please try again later.
R e s t C l i e n t s
D e l t a A P I c o n f o r m s t o t h e S w a g g e r s p e c f o r R E S T e n d p o i n t s . A n y S w a g g e r - c o m p a t i b l e c l i e n t c a n c o n n e c t t o t h e D e l t a A P I a n d e x e c u t e c o m m a n d s .
Y o u c a n f i n d t h e s w a g g e r s p e c j s o n f o r D e l t a A p i h e r e
W e a l s o h a v e R e s t A p i C l i e n t s a v a i l a b l e f o r t h e f o l l o w i n g l a n g u a g e s
● N o d e j s
● P y t h o n
C C X T
C C X T i s o u r a u t h o r i z e d S D K p r o v i d e r a n d y o u m a y a c c e s s o u r A P I t h r o u g h C C X T .
F o r m o r e i n f o r m a t i o n , p l e a s e v i s i t c c x t w e b s i t e .
W e b s o c k e t F e e d
W e b s o c k e t a p i c a n b e u s e d f o r t h e f o l l o w i n g u s e c a s e s
● G e t r e a l t i m e f e e d o f m a r k e t d a t a , t h i s i n c l u d e s L 2 a n d L 3 o r d e r b o o k a n d r e c e n t t r a d e s .
● G e t p r i c e f e e d s - M a r k p r i c e s o f d i f f e r e n t c o n t r a c t s , p r i c e f e e d o f u n d e r l y i n g i n d e x e s e t c .
● G e t a c c o u n t s p e c i f i c n o t i f i c a t i o n s l i k e f i l l s , l i q u i d a t i o n s , A D L a n d P n L u p d a t e s .
A c c e s s u r l
● P r o d u c t i o n - w s s : / / s o c k e t . d e l t a . e x c h a n g e
● T e s t n e t - w s s : / / t e s t n e t - s o c k e t . d e l t a . e x c h a n g e
Y o u w i l l b e d i s c o n n e c t e d , i f t h e r e i s n o a c t i v i t y w i t h i n 6 0 a f t e r m a k i n g c o n n e c t i o n .
S u b s c r i b i n g t o C h a n n e l s
S u b s c r i b e
T o b e g i n r e c e i v i n g f e e d m e s s a g e s , y o u m u s t f i r s t s e n d a s u b s c r i b e m e s s a g e t o t h e s e r v e r i n d i c a t i n g w h i c h c h a n n e l s a n d c o n t r a c t s t o s u b s c r i b e f o r .
T o s p e c i f y c o n t r a c t s w i t h i n e a c h c h a n n e l , j u s t p a s s a l i s t o f s y m b o l s i n s i d e t h e c h a n n e l p a y l o a d .
O n c e a s u b s c r i b e m e s s a g e i s r e c e i v e d t h e s e r v e r w i l l r e s p o n d w i t h a s u b s c r i p t i o n s m e s s a g e t h a t l i s t s a l l c h a n n e l s y o u a r e s u b s c r i b e d t o . S u b s e q u e n t s u b s c r i b e m e s s a g e s w i l l a d d t o t h e l i s t o f s u b s c r i p t i o n s .
S u b s c r i p t i o n S a m p l e
// Request
// Subscribe to BTCUSD_28Dec and ETHBTC_28Dec with the ticker and orderbookL2 channels,
{
"type": "subscribe",
"payload": {
"channels": [
{
"name": "ticker",
"symbols": [
"BTCUSD_28Dec",
"ETHBTC_28Dec"
]
},
{
"name": "l2_orderbook",
"symbols": [
"BTCUSD_28Dec"
]
}
]
}
}
// Response
{
"type": "subscriptions",
"channels": [
{
"name": "l2_orderbook",
"symbols": [
"BTCUSD_28Dec"
],
},
{
"name": "ticker",
"symbols": [
"BTCUSD_28Dec",
"ETHBTC_28Dec"
]
}
]
}
// Error Response
{
"type": "subscriptions",
"channels": [
{
"name": "l2_orderbook",
"symbols": [
"BTCUSD_28Dec"
],
},
{
"name": "trading_notifications",
"error": "subscription forbidden on trading_notifications. Unauthorized user"
}
]
}
U n s u b s c r i b e
I f y o u w a n t t o u n s u b s c r i b e f r o m c h a n n e l / c o n t r a c t s p a i r s , s e n d a n " u n s u b s c r i b e " m e s s a g e . T h e s t r u c t u r e i s e q u i v a l e n t t o s u b s c r i b e m e s s a g e s . I f y o u w a n t t o u n s u b s c r i b e f o r s p e c i f i c s y m b o l s i n a c h a n n e l , y o u c a n p a s s i t i n t h e s y m b o l l i s t . A s a s h o r t h a n d y o u c a n a l s o p r o v i d e n o s y m b o l s f o r a c h a n n e l , w h i c h w i l l u n s u b s c r i b e y o u f r o m t h e c h a n n e l e n t i r e l y .
U n s u b s c r i b e S a m p l e
// Request
{
"type": "unsubscribe",
"payload": {
"channels": [
{
"name": "ticker", // unsubscribe from ticker channel only for BTCUSD_28Dec
"symbols": [
"BTCUSD_28Dec"
]
},
{
"name": "l2_orderbook" // unsubscribe from all symbols for l2_orderbook channel
}
]
}
}
A u t h e n t i c a t i n g a c o n n e c t i o n
A u t h e n t i c a t i o n a l l o w s c l i e n t s t o r e c e i v e s p r i v a t e m e s s a g e s , l i k e t r a d i n g n o t i f i c a t i o n s . E x a m p l e s o f t h e t r a d i n g n o t i f i c a t i o n s a r e : f i l l s , l i q u i d a t i o n s , a d l a n d p n l u p d a t e s .
T o a u t h e n t i c a t e , y o u n e e d t o s e n d a s i g n e d r e q u e s t o f t y p e ' a u t h ' o n y o u r s o c k e t c o n n e c t i o n . C h e c k t h e a u t h e n t i c a t i o n s e c t i o n a b o v e f o r m o r e d e t a i l s o n h o w t o s i g n a r e q u e s t u s i n g a p i k e y a n d s e c r e t .
T h e p a y l o a d f o r t h e s i g n e d r e q u e s t w i l l b e
' G E T ' + t i m e s t a m p + ' / l i v e '
T o s u b s c r i b e t o p r i v a t e c h a n n e l s , t h e c l i e n t n e e d s t o f i r s t s e n d a n a u t h e v e n t , p r o v i d i n g a p i - k e y , a n d s i g n a t u r e .
A u t h e n t i c a t i o n s a m p l e
// auth message with signed request
import websocket
import hashlib
import hmac
import base64
api_key = 'a207900b7693435a8fa9230a38195d'
api_secret = '7b6f39dcf660ec1c7c664f612c60410a2bd0c258416b498bf0311f94228f'
def generate_signature ( secret , message ):
message = bytes ( message , 'utf-8' )
secret = bytes ( secret , 'utf-8' )
hash = hmac . new ( secret , message , hashlib . sha256 )
return hash . hexdigest ()
def get_time_stamp ():
d = datetime . datetime . utcnow ()
epoch = datetime . datetime ( 1970 , 1 , 1 )
return str ( int (( d - epoch ) . total_seconds ()))
# Get open orders
method = 'GET'
timestamp = get_time_stamp ()
path = '/live'
signature_data = method + timestamp + path
signature = generate_signature ( api_secret , signature_data )
ws = websocket . WebSocketApp ( 'wss://api.delta.exchange:2096' )
ws . send ( json . dumps ({
"type" : "auth" ,
"payload" : {
"api-key" : api_key ,
"signature" : signature ,
"timestamp" : timestamp
}
}))
T o u n s u b s c r i b e f r o m a l l p r i v a t e c h a n n e l s , j u s t s e n d a ' u n a u t h ' m e s s a g e o n t h e s o c k e t . T h i s w i l l a u t o m a t i c a l l y u n s u b s c r i b e t h e c o n n e c t i o n f r o m a l l a u t h e n t i c a t e d c h a n n e l s .
ws . send ( json . dumps ({
"type" : 'unauth' ,
"payload" : {}
}))
D e t e c t i n g C o n n e c t i o n D r o p s
S o m e c l i e n t l i b r a r i e s m i g h t n o t d e t e c t c o n n e c t i o n d r o p s p r o p e r l y . W e p r o v i d e t w o m e t h o d s f o r t h e c l i e n t s t o e n s u r e t h e y a r e c o n n e c t e d a n d g e t t i n g s u b s c r i b e d d a t a .
H e a r t b e a t ( R e c o m m e n d e d )
T h e c l i e n t c a n e n a b l e h e a r t b e a t o n t h e s o c k e t . I f h e a r t b e a t i s e n a b l e d , t h e s e r v e r i s e x p e c t e d t o p e r i o d i c a l l y s e n d a h e a r t b e a t m e s s a g e t o t h e c l i e n t . R i g h t n o w , t h e h e a r t b e a t t i m e i s s e t t o 3 0 s e c o n d s .
H o w t o I m p l e m e n t o n c l i e n t s i d e
● E n a b l e h e a r t b e a t ( c h e c k s a m p l e c o d e ) a f t e r e a c h s u c c e s s f u l s o c k e t c o n n e c t i o n
● S e t a t i m e r w i t h d u r a t i o n o f 3 5 s e c o n d s ( W e t a k e 5 s e c o n d s b u f f e r f o r h e a r t b e a t t o a r r i v e ) .
● W h e n y o u r e c e i v e a n e w h e a r t b e a t m e s s a g e , y o u r e s e t t h e t i m e r
● I f t h e t i m e r i s c a l l e d , t h a t m e a n s t h e c l i e n t d i d n ' t r e c e i v e a n y h e a r t b e a t i n l a s t 3 5 s e c o n d s . I n t h i s c a s e , t h e c l i e n t s h o u l d e x i t t h e e x i s t i n g c o n n e c t i o n a n d t r y t o r e c o n n e c t .
// Enable Heartbeat on successful connection
ws.send({
"type": "enable_heartbeat"
})
// Disable Heartbeat
ws.send({
"type": "disable_heartbeat"
})
// Sample Heartbeat message received periodically by client
{
"type": "heartbeat"
}
P i n g / P o n g
T h e c l i e n t c a n p e r i o d i c a l l y ( ~ e v e r y 3 0 s e c o n d s ) s e n d a p i n g f r a m e o r a r a w p i n g m e s s a g e a n d t h e s e r v e r w i l l r e s p o n d b a c k w i t h a p o n g f r a m e o r a r a w p o n g r e s p o n s e . I f t h e c l i e n t d o e s n ' t r e c e i v e a p o n g r e s p o n s e i n n e x t 5 s e c o n d s , t h e c l i e n t s h o u l d e x i t t h e e x i s t i n g c o n n e c t i o n a n d t r y t o r e c o n n e c t .
// Ping Request
ws.send({
"type": "ping"
})
// Pong Response
ws.send({
"type": "pong"
})
P u b l i c C h a n n e l s
v 2 t i c k e r
T h e t i c k e r c h a n n e l p r o v i d e s p r i c e c h a n g e d a t a f o r t h e l a s t 2 4 h r s ( r o l l i n g w i n d o w ) . I t i s p u b l i s h e d e v e r y 5 s e c o n d s .
O n s u b s c r i b i n g t o v 2 / t i c k e r c h a n n e l , s o c k e t s e r v e r w i l l e m i t m e s s a g e s w i t h t y p e ' t i c k e r ' i n r e s p o n s e .
T i c k e r S a m p l e
// Response
{
"close": 0.00001327,
"high": 0.00001359,
"low": 0.00001323,
"mark_price": "0.00001325",
"open": 0.00001347,
"product_id": 56,
"size": 1254631, // num of contracts traded
"spot_price": "0.00001326",
"symbol": "ADABTC",
timestamp: 1595242187705121, // in us
"turnover": 16.805033569999996, // turnover reported in settling symbol
"turnover_symbol": "BTC", // settling symbol
"turnover_usd": 154097.09108233, // turnover in usd
"volume": 1254631 // volume is defined as contract_value * size
}
l 2 _ o r d e r b o o k
l 2 _ o r d e r b o o k c h a n n e l p r o v i d e s s n a p s h o t o f t h e l a t e s t l e v e l 2 o r d e r b o o k .
L 2 O r d e r b o o k S a m p l e
// l2 orderbook Response
{
"symbol": "BTCUSD_28Dec",
"product_id": 3,
"type": "l2_orderbook",
"timestamp": 1561634049751430,
"buy": [{"limit_price":"0.0014577","size":62},{"limit_price":"0.0014571","size":28}],
"sell": [{"limit_price":"6229.0","size":15964},{"limit_price":"6229.5","size":3504},{"limit_price":"6230.0","size":15964},{"limit_price":"6231.0","size":15957}]
}
a l l _ t r a d e s
a l l _ t r a d e s c h a n n e l p r o v i d e s a r e a l t i m e f e e d o f a l l t r a d e s ( f i l l s ) .
// All Trades Response
{
symbol: "BNBBTC_30Nov",
price: "0.0014579",
size: 100,
type: "all_trades",
buyer_role: "maker",
seller_role: "taker",
timestamp: 1561634049751430
}
m a r k _ p r i c e
m a r k _ p r i c e c h a n n e l p r o v i d e s a r e a l t i m e f e e d o f m a r k p r i c e . T h i s i s t h e p r i c e o n w h i c h a l l o p e n p o s i t i o n s a r e m a r k e d f o r l i q u i d a t i o n .
P l e a s e n o t e t h a t t h e p r o d u c t s y m b o l i s p r e p e n d e d w i t h a " M A R K : " t o s u b s c r i b e f o r m a r k p r i c e .
// Mark Price Response
{
symbol: "MARK:BNBBTC_30Nov",
product_id: 7,
type: "mark_price",
price: "0.00401010",
annualized_basis: "25.12", // in %
timestamp: 1561634049751430
}
s p o t _ p r i c e
s p o t _ p r i c e c h a n n e l p r o v i d e s a r e a l t i m e f e e d o f t h e u n d e r l y i n g i n d e x p r i c e s .
// Spot Price Response
{
symbol: ".DEBNBBTC",
price: "0.0014579",
type: "spot_price",
timestamp: 1561634049751430
}
f u n d i n g _ r a t e
f u n d i n g _ r a t e c h a n n e l p r o v i d e s a r e a l t i m e f e e d o f f u n d i n g r a t e s f o r p e r p e t u a l c o n t r a c t s .
// Funding Rate Response
{
symbol: "BNBBTC_30Nov",
product_id: 7,
type: "funding_rate",
funding_rate: "-0.00401010", // in %
timestamp: 1561634049751430 // in us
}
p r o d u c t _ u p d a t e s
T h i s c h a n n e l p r o v i d e s u p d a t e s w h e n m a r k e t s a r e d i s r u p t e d a n d r e s u m e d . O n o p e n i n g , w e c o n d u c t a s i n g l e p r i c e a u c t i o n a n d a u c t i o n s t a r t i n g a n d f i n i s h e v e n t s a r e a l s o p u b l i s h e d o n t h i s c h a n n e l . T o s u b s c r i b e , y o u d o n t n e e d t o p a s s t h e s y m b o l l i s t . T h i s c h a n n e l a u t o m a t i c a l l y s u b s c r i b e s t o a l l m a r k e t s b y d e f a u l t .
P r o d u c t U p d a t e s S a m p l e
// Market Disruption Response
{
"type":"product_updates",
"event":"market_disruption",
"product":{
"id":17,
"symbol":"NEOUSDQ",
"trading_status":"disrupted_cancel_only",
},
"timestamp": 1561634049751430,
}
// Auction Started Response
{
"type":"product_updates",
"event":"start_auction",
"product":{
"id":17,
"symbol":"NEOUSDQ",
"trading_status":"disrupted_post_only",
},
"timestamp": 1561634049751430,
}
// Auction Finished Response
{
"type":"product_updates",
"event":"finish_auction",
"product":{
"id":17,
"symbol":"NEOUSDQ",
"trading_status":"operational",
},
"timestamp": 1561634049751430,
}
M a r k e t D i s r u p t i o n
W h e n m a r k e t s a r e d i s r u p t e d , o r d e r b o o k e n t e r s i n t o c a n c e l o n l y m o d e . Y o u c a n r e f e r t o " t r a d i n g _ s t a t u s " f i e l d i n p r o d u c t i n f o t o d e t e r m i n e t h i s . I n c a n c e l o n l y m o d e , y o u c a n o n l y c a n c e l y o u r o r d e r s . N o m a t c h i n g h a p p e n s i n t h i s m o d e .
A u c t i o n S t a r t e d
W h e n m a r k e t s n e e d t o c o m e u p , w e c o n d u c t a s i n g l e p r i c e a u c t i o n . I n t h i s c a s e , o r d e r b o o k e n t e r s i n t o p o s t o n l y m o d e . I n p o s t o n l y m o d e , y o u c a n p o s t n e w o r d e r s , c a n c e l e x i s i t i n g o r d e r s , a d d m o r e m a r g i n t o o p e n p o s i t i o n s . N o m a t c h i n g h a p p e n s i n t h i s m o d e . I t i s p o s s i b l e t o s e e a n o v e r l a p b e t w e e n a s k s a n d b i d s d u r i n g t h i s t i m e .
A u c t i o n F i n i s h e d
W h e n a u c t i o n f i n i s h e s , m a r k e t s e n t e r i n t o o p e r a t i o n a l m o d e a n d t r a d i n g c o n t i n u e s a s u s u a l .
Y o u c a n r e a d m o r e a b o u t t h e s i n g l e p r i c e a u c t i o n h e r e
a n n o u n c e m e n t s
T h i s c h a n n e l p r o v i d e s u p d a t e s o n s y s t e m w i d e a n n o u n c e m e n t s l i k e s c h e d u l e d m a i n t e n a n c e , n e w c o n t r a c t l a u n c h e s e t c . N o n e e d t o p a s s a n y s y m b o l s w h i l e s u b s c r i b i n g t o t h i s c h a n n e l .
A n n o u n c e m e n t s S a m p l e
// Maintenance Started Response
{
"type":"announcements",
"event":"maintenance_started",
"maintenance_finish_time": 1561638049751430,
"timestamp": 1561634049751430,
}
// Maintenance Finished Response
{
"type":"announcements",
"event":"maintenance_finished",
"timestamp": 1561634049751430,
}
c a n d l e s t i c k s
T h i s c h a n n e l p r o v i d e s l a s t o h l c c a n d l e f o r g i v e n t i m e r e s o l u t i o n .
S u b s c r i b e t o c a n d l e s t i c k _ $ { r e s o l u t i o n } c h a n n e l f o r u p d a t e s .
L i s t o f s u p p o r t e d r e s o l u t i o n s
[ " 1 m " , " 3 m " , " 5 m " , " 1 5 m " , " 3 0 m " , " 1 h " , " 2 h " , " 4 h " , " 6 h " , " 1 2 h " , " 1 d " , " 1 w " , " 2 w " , " 3 0 d " ]
O H L C c a n d l e s u p d a t e s a m p l e
Sample Subscribe Request
{
"name": "candlestick_1m", // "candlestick_" + resolution
"symbols": [ "BTCUSD", "ETHUSDT" ] // product symbol
}
Sample feed response
{
"candle_start_time": 1596015240000000,
"close": 9223,
"high": 9228,
"low": 9220,
"open": 9221,
"resolution": "1m",
"symbol": "BTCUSD_P",
"timestamp": 1596015289339699,
"type": "candlestick_1m",
"volume": 1.2
}
P r i v a t e C h a n n e l s
P r i v a t e c h a n n e l s r e q u i r e c l i e n t s t o a u t h e n t i c a t e .
M a r g i n s
C h a n n e l p r o v i d e s u p d a t e s f o r m a r g i n b l o c k e d f o r d i f f e r e n t a s s e t s , t h e s e u p d a t e s a r e p r o v i d e d o n l y o n c h a n g e o f m a r g i n .
// margin update
{
"type": "margins",
"balance": "1.0012",
"order_margin": "0.121212", // Margin blocked in open orders
"position_margin: "0.101212", // Margin blocked in position
"commission": "0.00012", // commissions blocked in position and order
"asset_id": 2 // BTC
}
P o s i t i o n s
C h a n n e l p r o v i d e s u p d a t e s f o r c h a n g e i n p o s i t i o n . N e e d t o p a s s l i s t o f p r o d u c t s y m b o l s w h i l e s u b s c r i b i n g . t h e s e u p d a t e s a r e p r o v i d e d o n l y o n c h a n g e o f p o s i t i o n .
A s n a p s h o t o f c u r r e n t o p e n p o s i t i o n w i l l b e s e n t a f t e r s u b s c r i b i n g a s y m b o l , i n c r e m e n t a l u p d a t e s w i l l b e s e n t o n t r a d e e x e c u t i o n s .
// Position update
{
"type": "positions",
"action": "", // "create"/"update"/"delete"
"reason": "", // null, "auto_topup"
"symbol": "BTCUSD_29Mar", // Product Symbol
"product_id": 1, // Product ID
"size": -100, // Position size, if > 0 -> long else short
"margin": "0.0121", // Margin blocked in the position
"entry_price": "3500.0", // Avg Entry price of the position
"liquidation_price": "3356.0", // Liquidation trigger price
"bankruptcy_price": "3300.0", // Bankruptcy Price
"commission": "0.00001212" // Commissions blocked for closing the position
}
//Snapshot
{
"result":[
{
"adl_level":"4.3335",
"auto_topup":false,
"bankruptcy_price":"261.82",
"commission":"17.6571408",
"created_at":"2021-04-29T07:25:59Z",
"entry_price":"238.023457888493475682",
"liquidation_price":"260.63",
"margin":"4012.99",
"product_id":357,
"product_symbol":"ZECUSDT",
"realized_funding":"-3.08",
"realized_pnl":"6364.57",
"size":-1686,
"updated_at":"2021-04-29T10:00:05Z",
"user_id":1,
"symbol":"ZECUSDT"
}
],
"success":true,
"type":"positions",
"action":"snapshot"
}
O r d e r s
C h a n n e l p r o v i d e s u p d a t e s w h e n a n y o r d e r i s u p d a t e d f o r a n y a c t i o n s u c h a s f i l l , q u a n t i t y c h a n g e . N e e d t o p a s s l i s t o f p r o d u c t s y m b o l s w h i l e s u b s c r i b i n g .
A s n a p s h o t o f a l l o p e n / p e n d i n g o r d e r s w i l l b e s e n t a f t e r s u b s c r i b i n g a s y m b o l . A n d a l l i n c r e m e n t a l u p d a t e s w i l l b e s e n t o n c r e a t e / u p d a t e / d e l e t e o f o r d e r s
A l l u p d a t e s i n c l u d i n g s n a p s h o t w i l l h a v e i n c r e m e n t a l s e q _ i d . s e q _ i d i s s e p a r a t e f o r e a c h s y m b o l .
A n y o f t h e f o l l o w i n g e v e n t s c a n b e t r a c k e d b y t h e r e a s o n f i e l d i n t h i s c h a n n e l
● f i l l
● s t o p _ u p d a t e
● s t o p _ t r i g g e r
● s t o p _ c a n c e l
● l i q u i d a t i o n
● s e l f _ t r a d e
// Order update
{
"type": "orders",
"action": "create", // "create"/"update"/"delete"
"reason": "", // "fill"/"stop_update"/"stop_trigger"/"stop_cancel"/"liquidation"/"self_trade"/null
"symbol": "BTCUSD_29Mar", // Product Symbol
"product_id": 1, // Product ID
"order_id": 1234 // Order id
"client_order_id": "" // Client order id
"size": 100, // Order size
"unfilled_size": 55, // Unfilled size
"limit_price": "9000.00" // Price of the order
"side": "buy" // Order side (buy or sell)
"cancellation_reason": "cancelled_by_user" // Cancellation reason in case of cancelled order, null otherwise
"stop_order_type": "stop_loss_order", // If a Stop Order -> "stop_loss_order"/"take_profit_order", null otherwise
"bracket_order": false // true for a bracket_order, false otherwise
"state": "open" // "open"/"pending"/"closed"/"cancelled"
"seq_no": 1 // Incremental sequence number
"timestamp": 1594105083998848 // Unix timestamp in microseconds
"stop_price": "9010.00" // stop_price of stop order
"trigger_price_max_or_min": "9020.00" // for trailing stop orders
"bracket_stop_loss_price": "8090.00"
"bracket_stop_loss_limit_price": "8090.00"
"bracket_take_profit_price": "9020"
"bracket_take_profit_limit_price": "9020"
"bracket_trail_amount": "10.00"
}
// Snapshot
{
"meta": {
"seq_no": 7,
"timestamp": 1594149235554045
},
"result": [
{
"id": 1592130,
"limit_price": "9000",
"order_type": "limit_order",
"product_id": 13,
"reduce_only": false,
"side": "buy",
"size": 1,
"state": "open",
"stop_order_type": null,
"stop_price": null,
"time_in_force": "gtc",
"trail_amount": null,
"unfilled_size": 1,
"user_id": 1132
}
],
"success": true,
"symbol": "BTCUSD",
"type": "orders",
"action": "snapshot"
}
U s e r T r a d e s
C h a n n e l p r o v i d e s u p d a t e s f o r f i l l s . N e e d t o p a s s l i s t o f p r o d u c t s y m b o l s w h i l e s u b s c r i b i n g .
A l l u p d a t e s w i l l h a v e i n c r e m e n t a l s e q _ i d . s e q _ i d i s s e p a r a t e f o r e a c h s y m b o l .
A u t o D e l e v e r a g e L i q u i d a t i o n s o f a p o s i t i o n c a n b e t r a c k e d b y r e a s o n : " a d l " i n t h e u s e r _ t r a d e s c h a n n e l .
// user_trades
{
"symbol": "BNBBTC_30Nov",
"fill_id": "1234-abcd-qwer-3456",
"reason": "normal" // "normal" or "adl"
"product_id": 7,
"type": "user_trades",
"user_id": 1998,
"order_id": 3283999,
"side": "buy",
"size": 190,
"price": "0.00145791",
"role": "taker",
"client_order_id": "GA123",
"timestamp": 1544091555086559,
"seq_no": 1
}
W e b S o c k e t R P C
Y o u c a n m a k e r e q u e s t s o v e r r p c ( R e m o t e P r o c e d u r e C a l l ) u s i n g t h e s o c k e t a p i . A l m o s t a l l r e s t e n d p o i n t s c a n b e i n v o k e d a s r p c c a l l s t o t h e W e b S o c k e t S e r v e r .
R e m o t e P r o c e d u r e C a l l ( R P C ) i s a p r o t o c o l t h a t o n e p r o g r a m c a n u s e t o r e q u e s t a s e r v i c e f r o m a p r o g r a m l o c a t e d i n a n o t h e r c o m p u t e r i n a n e t w o r k w i t h o u t h a v i n g t o u n d e r s t a n d n e t w o r k d e t a i l s . R P C u s e s t h e c l i e n t / s e r v e r m o d e l . T h e r e q u e s t i n g p r o g r a m i s a c l i e n t a n d t h e s e r v i c e - p r o v i d i n g p r o g r a m i s t h e s e r v e r .
T h e c l i e n t s e n d s r e q u e s t m e s s a g e t o t h e s e r v e r a n d t h e n w a i t s f o r t h e r e s p o n s e .
S o c k e t c o n n e c t i o n n e e d s t o b e a u t h e n t i c a t e d t o m a k e R P C r e q u e s t s .
R e q u e s t M e s s a g e
T h e r e q u e s t m e s s a g e m u s t b e J S O N o b j e c t w i t h t h e f o l l o w i n g f i e l d s .
Name
Type
Description
type
string
Type of request message.
payload
object
The payload object contains method, params and id.
method
string
The method to be invoked.
params
object
The parameters for the method that needs to be invoked.
id
string
An identifier of the request. If it is included, then the response will contain the same identifier
// Socket RPC request message sample
{
"type": "rpc",
"payload" : {
"method": "post/orders",
"params" : {
"order_type":"limit_order",
"size":1,
"side":"buy",
"limit_price":"4200",
"product_id":16,
"post_only":"false",
"reduce_only":"false",
"time_in_force":"gtc"
},
"id": "1234"
}
}
R e s p o n s e M e s s a g e
T h e r e s p o n s e m e s s a g e w i l l b e s i m i l a r t o t h e R E S T A P I .
C h a n g e l o g
V 2 R e s t A p i
O u r v 2 A p i i s s i g n i f i c a n t l y f a s t e r t h a n t h e v 1 a p i . O u r f o c u s w h i l e r e b u i l d i n g v 2 A p i s w a s o n t h e f o l l o w i n g
(一) R e m o v e A p i g a t e w a y o v e r h e a d s a s m u c h a s p o s s i b l e .
(二) R e m o v e o v e r h e a d s d u e t o d e e p n e s t i n g i n r e s p o n s e p a y l o a d .
(三) B e t t e r A p i s t r u c t u r e t o q u e r y o n l y r e q u i r e d d a t a .
N e w R e s p o n s e F o r m a t
// The new format supports sending meta data alongside response body.
// Success format
{
success: true,
result: ...., // response body
meta: {
after: "...", // cursor for pagination, is returned in meta
before: null,
},
}
// Error Format
{
success: false,
error: {
code: :insufficient_margin, // error code
context: { // error context
additional_margin_required: "0.121"
}
}
}
K e y A p i c h a n g e s
● W e h a v e c o m p l e t e l y r e m o v e d n e s t e d p r o d u c t / a s s e t p a y l o a d s f r o m l i v e o r d e r s a n d l i v e p o s i t i o n s . T h i s e n s u r e s t h e p a y l o a d i s l i g h t .
● R a t e l i m i t i n g n o w w o r k s o n a f i x e d w i n d o w i n s t e a d o f a r o l l i n g w i n d o w .
● T i c k e r A p i - n o w i n c l u d e s t u r n o v e r i n U S D , m a r k p r i c e , s p o t p r i c e .
● O r d e r b o o k a n d t r a d e s a r e n o w r e t u r n e d i n s e p a r a t e A p i s .
● F o r s u p p o r t i n g t r a d i n g s t r a t e g i e s w h i c h r e q u i r e l a t e s t p o s i t i o n s , N o w w e h a v e t w o d i f f e r e n t A p i s t o q u e r y p o s i t i o n .
/ v 2 / p o s i t i o n s - r e t u r n s o n l y s i z e a n d e n t r y p r i c e . T h i s s h o u l d b e u s e d w h e n y o u w a n t t o g e t t h e l a t e s t p o s i t i o n , b u t d o n t n e e d t h e m a r g i n d e p e n d e n t f i e l d s l i k e l i q u i d a t i o n p r i c e , b a n k r u p t c y p r i c e e t c
/ v 2 / p o s i t i o n s / m a r g i n e d - r e t u r n s a l l f i e l d s i n c l u d i n g m a r g i n d e p e n d e n t f i e l d s . W h e n t h e p o s i t i o n i s u p d a t e d d u e t o a f i l l , c h a n g e s m i g h t t a k e s o m e t i m e t o r e f l e c t i n t h i s A p i .
● A l l A p i s t h a t s u p p o r t p a g i n a t i o n n o w u s e c u r s o r b a s e d p a g i n a t i o n , i n s t e a d o f f i x e d p a g e s i z e p a g i n a t i o n . C h e c k m o r e d e t a i l s i n o u r p y t h o n r e s t c l i e n t d o c s
N e w S o c k e t C h a n n e l s
● S o c k e t A p i i n t e r f a c e h a s n ' t c h a n g e d m u c h i n t e r m s o f c o n n e c t i o n m a n a g e m e n t a n d a u t h e n t i c a t i o n .
● W e h a v e d e p r e c a t e d o l d c h a n n e l s a n d c r e a t e d n e w c h a n n e l s w h i c h m a k e i n t e g r a t i o n e a s i e r .
● T o s u p p o r t e a s y m a n a g e m e n t o f l i v e d a t a , a l l p r i v a t e d a t a c h a n n e l s n o w s u p p o r t i n i t i a l s n a p s h o t s a n d s e q u e n c e n u m b e r s .
L i s t o f n e w p u b l i c c h a n n e l s
● v 2 / t i c k e r - n o w i n c l u d e s t u r n o v e r i n U S D , m a r k p r i c e , s p o t p r i c e
● c a n d l e s t i c k s - s u b s c r i b e t o o h l c c a n d l e u p d a t e s f o r d i f f e r e n t r e s o l u t i o n s
● a l l _ t r a d e s - s u b s c r i b e t o a l l p u b l i c t r a d e s f o r a s y m b o l
L i s t o f n e w p r i v a t e c h a n n e l s
● o r d e r s - s u b s c r i b e t o l i f e c y c l e o f l i v e o r d e r s
● u s e r _ t r a d e s - s u b s c r i b e t o l i v e u s e r t r a d e s / f i l l s f e e d
● p o s i t i o n s - s u b s c r i b e t o p o s i t i o n u p d a t e s
● m a r g i n s - g e t m a r g i n / w a l l e t u p d a t e s
S e c u r i t y
W e t a k e t h e s e c u r i t y , i n t e g r i t y , a v a i l a b i l i t y o f o u r s e r v i c e s , a n d t h e p r i v a c y o f o u r u s e r s s e r i o u s l y . W e a p p r e c i a t e a l l s e c u r i t y c o n c e r n s b r o u g h t f o r t h a n d a r e c o n s t a n t l y s t r i v i n g t o k e e p o n t o p o f t h e l a t e s t t h r e a t s . B e i n g p r o a c t i v e r a t h e r t h a n r e a c t i v e t o e m e r g i n g s e c u r i t y i s s u e s i s a f u n d a m e n t a l b e l i e f a t D e l t a E x c h a n g e . E v e r y d a y n e w s e c u r i t y i s s u e s a n d a t t a c k v e c t o r s a r e c r e a t e d . D e l t a E x c h a n g e s t r i v e s t o k e e p a b r e a s t o f t h e l a t e s t s t a t e - o f - t h e - a r t s e c u r i t y d e v e l o p m e n t s b y w o r k i n g w i t h i n d e p e n d e n t s e c u r i t y r e s e a r c h e r s . W e a p p r e c i a t e t h e c o m m u n i t y ' s e f f o r t s i n c r e a t i n g a m o r e s e c u r e w o r l d .
T a r g e t s I n s c o p e
● h t t p s : / / * . d e l t a . e x c h a n g e
A n y d o m a i n / p r o p e r t y o f D e l t a E x c h a n g e N e t w o r k n o t l i s t e d i n t h e t a r g e t s s e c t i o n i s o u t o f s c o p e . T h i s i n c l u d e s a n y / a l l s u b d o m a i n s n o t l i s t e d a b o v e .
H o w t o a c c e s s
● Y o u w i l l a c c e s s t h e D e l t a E x c h a n g e s e r v i c e u s i n g t e s t a c c o u n t s a n d u n a u t h e n t i c a t e d g u e s t s .
● P l e a s e c r e a t e a D e l t a E x c h a n g e t e s t a c c o u n t o n y o u r o w n u s i n g y o u r t e s t e m a i l a d d r e s s . Y o u r e m a i l m u s t c o n t a i n k e y w o r d ' t e s t ' f o r e x a m p l e t e s t @ g m a i l . c o m .
● A l l e m a i l s w i l l g o t o t h e e m a i l a d d r e s s a s s o c i a t e d w i t h y o u r a c c o u n t . Y o u w i l l n e e d t o a c t i v a t e y o u r a c c o u n t b y c o n f i r m i n g r e c e i p t o f t h e a c t i v a t i o n e m a i l .
● N O T E : O n c e a v u l n e r a b i l i t y i s f o u n d p l e a s e f i l e a s u b m i s s i o n i m m e d i a t e l y . O u r s e c u r i t y t e a m w i l l i n v e s t i g a t e a n d a s s e s s t h e i m p a c t .
R e w a r d r a n g e
F o c u s A r e a s
● U s e r D a t a / U s e r i n f o r m a t i o n L e a k s
● I n j e c t i o n a t t a c k s ( S e r v e r / C l i e n t s i d e )
● R C E ( R e m o t e C o d e E x e c u t i o n )
● A u t h e n t i c a t i o n b y p a s s / v a l i d a t i o n ( C l i e n t / S e r v e r s i d e )
● P r i v i l e g e e s c a l a t i o n ( V e r t i c a l / H o r i z o n t a l )
Technical
Severity
Reward
P1
Critical
Decided by internal team, can be from ($10-$1000)
P2
Severe
Decided by internal team, can be from ($10-$1000)
P3
Moderate
$10 - $100
R u l e s o f e n g a g e m e n t
W e a r e i n t e r e s t e d i n h e a r i n g a b o u t s e c u r i t y i s s u e s i n P r o d u c t i o n / D e v D e l t a E x c h a n g e e n v i r o n m e n t s .
T h e r e a r e s o m e t h i n g s w e e x p l i c i t l y a s k y o u n o t t o d o
● D o n o t r u n a u t o m a t e d s c a n s w i t h o u t c h e c k i n g w i t h u s f i r s t . T h e y a r e o f t e n v e r y n o i s y . ( I f r u n n i n g a n y a u t o m a t e d t e s t i n g t o o l s , b e s u r e t o k e e p w e l l u n d e r 7 5 - 1 0 0 r e q u e s t s p e r s e c o n d - o t h e r w i s e y o u ' r e l i k e l y t o g e t l o c k e d o u t . )
● D o n o t t e s t t h e p h y s i c a l s e c u r i t y o f D e l t a E x c h a n g e o f f i c e s , e m p l o y e e s , e q u i p m e n t , e t c .
● D o n o t r u n F u l l f l e d g e d e x p l o i t s w h i c h c a n c a u s e a p p l i c a t i o n c r a s h e s a n d a f f e c t i n t e g r i t y o f o u r a c t i v e s e r v i c e s . ( I f y o u b e l i e v e y o u h a v e a e x p l o i t t h a t n e e d s e r i o u s f i x e s p l e a s e e m a i l u s , a n d w e w i l l p r o v i d e y o u w i t h s a i d i n s t a n c e f o r s a i d s e r v i c e . )
● D o n o t t e s t u s i n g s o c i a l e n g i n e e r i n g t e c h n i q u e s ( p h i s h i n g , v i s h i n g , e t c . )
● D o n o t t e s t a g a i n s t a n y t y p e o f c u s t o m e r a c c o u n t w i t h o u t e x p l i c i t p e r m i s s i o n f r o m o u r s i d e .
● D o n o t a c c e s s , D e s t r o y o r o t h e r w i s e n e g a t i v e l y i m p a c t a n y r e s i d e n t i a l o r b u s i n e s s c u s t o m e r s , o r c u s t o m e r d a t a i n a n y w a y .
● D o n o t p e r f o r m D o S o r D D o S a t t a c k s ( A p p l i c a t i o n l e v e l , N e t w o r k L e v e l D O S / D D O S / p o r t f l o o d i n g a t t a c k s a r e s t r i c t l y n o t a p p r e c i a t e d a s t h i s c a n c a u s e d e l a y i n d e l i v e r y o f o u r s e r v i c e s t o o u r u s e r s w e s u g g e s t y o u t o n o t t o u s e s u c h m e t h o d o l o g i e s ) .
● D o n o t e n g a g e I n a n y w a y a t t a c k o u r e n d u s e r s , o r i n t h e t r a d e o f s t o l e n u s e r c r e d e n t i a l s .
● I n t e r a c t i n g w i t h r e a l c u s t o m e r s o r r e a l c u s t o m e r a c c o u n t s i s f o r b i d d e n .
R u l e s o f r e p o r t i n g
W e t a k e o u r I n t e r n a l p r o c e s s a n d w o r k f l o w s e r i o u s l y , W e h a v e a d e d i c a t e d s e c u r i t y t e a m w o r k i n g a n d t e s t i n g r o u n d t h e c l o c k , s o w e w o u l d l i k e y o u t o s e n d y o u r r e p o r t s t o o n l y [ e m a i l p r o t e c t e d ] a n d f o l l o w b e l o w s a i d r u l e s o r n o t f o l l o w i n g w i l l v o i d y o u f r o m o u r b u g b o u n t y b e n e f i t s , A l s o w e w o u l d l i k e y o u t o e n c r y p t e m a i l s s e n t t o u s w i t h a P G P k e y p r o v i d e d b e l o w i f t h e V u l n e r a b i l i t y i s S e v e r e o r C r i t i c a l .
● W e r e c o m m e n d y o u t o u s e e m a i l s w h i c h c o n t a i n t e s t a s a k e y w o r d i n t h e e m a i l a d d r e s s f o r e x a m p l e t e s t @ g m a i l . c o m .
● F o r t e s t i n g a n d r e p o r t i n g s o t h a t w e c a n i d e n t i f y y o u r a c t i v i t y o n o u r e n v i r o n m e n t s , a l s o w h i t e l i s t f o r I D S / F D S b l o c k s )
● D o n o t C C o r t a g o t h e r s t a f f w h i l e r e p o r t i n g .
● D o n o t c a l l o u t o n s o c i a l m e d i a o r m a k e b l o g p o s t s t o r e p o r t o r w i t h o u t r e p o r t i n g ( t h i s c a n l e a d t o l e g a l a c t i o n s t o b e t a k e n a g a i n s t y o u . )
● D o n o t d i s c u s s t h i s w i t h a n y , b u t o n l y D e l t a E x c h a n g e t e c h n i c a l s t a f f .
● D o n o t s e n d u s e x t e r n a l - l i n k s / e x e c u t a b l e / s c r i p t s i n r e p o r t i f p o s s i b l e a t t a c h a t e x t f i l e o r p d f . W i t h o u t z i p p ' i n g o r r a r ' i n g i t .
● S c r e e n s h o t s a r e a c c e p t e d i f o n l y i n P N G a n d J I F f o r m a t s f o r i n t e r n a l s e c u r i t y r e a s o n s .
● P O C V i d e o s a r e a c c e p t e d i f o n l y i n M P 4 , A V I , W E B M , M O V f o r m a t s f o r i n t e r n a l s e c u r i t y r e a s o n s .
● A n y o r A l l r e p o r t s m u s t o n l y r e a c h [ e m a i l p r o t e c t e d ]
S u m m a r y
H e l p u s g e t a n i d e a o f w h a t t h i s v u l n e r a b i l i t y i s a b o u t .
( e g . " h e y i h a v e f o u n d a x s s o n y o u r s e r v e r " )
T a r g e t
S e l e c t t h e v u l n e r a b l e t a r g e t D o m a i n n a m e / S u b d o m a i n n a m e
( e g . " s o a n d s o o n h t t p s : / / e x a m p l e . d e l t a . e x c h a n g e " )
V u l n e r a b i l i t y d e t a i l s
W h a t i s t h e B u g / V u l n e r a b i l i t y . A n d U R L / L o c a t i o n o f v u l n e r a b i l i t y .
( e g . b e c a u s e o f u n f i l t e r e d c h a r a c t e r s t h e u r l [ / s e a r c h . p h p ? q = ] p a t h / s e a r c h . p h p o n q p a r a m e t e r )
D e s c r i p t i o n o f T e c h n i c a l s e v e r i t y
H e l p u s u n d e r s t a n d t h e b u g / v u l n e r a b i l i t y t e c h n i c a l d e t a i l s
D e s c r i b e t h e v u l n e r a b i l i t y a n d i t s i m p a c t .
( e g . c l i e n t s i d e e x e c u t e s t h e j a v a s c r i p t w h i c h i s r e n d e r i n g t h r o u g h / s e a r c h . p h p ? q = s o m e s c r i p t )
R e c r e a t i o n
P r o v i d e a p r o o f o f c o n c e p t o r r e p l i c a t i o n s t e p s .
( e g . s t e p s t o b e u s e d b y o u r t e a m i n o r d e r t o r e c r e a t e t h e a t t a c k s c e n a r i o )
A d d i t i o n a l i n f o r m a t i o n
P r o v i d e u s w i t h R e q u e s t a n d R e s p o n s e d u m p / t r a c e d u m p / H T T P r e q u e s t
A t t a c h m e n t s ( r e c o m m e n d e d )
A t t a c h p r o o f - o f - c o n c e p t s c r i p t s , s c r e e n s h o t s , s c r e e n r e c o r d i n g s , e t c .
I n e l i g i b l e i s s u e s
T h e s e i s s u e s W i l l b e c l o s e d a s o u t o f s c o p e h e n c e n o t r e w a r d a b l e .
● T h e o r e t i c a l v u l n e r a b i l i t i e s w i t h o u t a c t u a l p r o o f o f c o n c e p t
● O p e n r e d i r e c t s ( t h r o u g h h e a d e r s a n d p a r a m e t e r s ) / L a c k o f s e c u r i t y s p e e d b u m p w h e n l e a v i n g t h e s i t e .
● I n t e r n a l I P a d d r e s s / v e r s i o n d i s c l o s u r e .
● E m a i l v e r i f i c a t i o n d e f i c i e n c i e s , e x p i r a t i o n o f p a s s w o r d r e s e t l i n k s , a n d p a s s w o r d c o m p l e x i t y p o l i c i e s
● I n v a l i d o r m i s s i n g S P F ( S e n d e r P o l i c y F r a m e w o r k ) r e c o r d s ( i n c o m p l e t e o r m i s s i n g S P F / D K I M / D M A R C )
● C l i c k j a c k i n g / U I r e d r e s s i n g w i t h m i n i m a l s e c u r i t y i m p a c t
● T e x t / c o d e i n j e c t i o n w i t h o u t a n y i m p a c t .
● E m a i l o r m o b i l e e n u m e r a t i o n ( E . g . t h e a b i l i t y t o i d e n t i f y e m a i l s v i a p a s s w o r d r e s e t )
● I n f o r m a t i o n d i s c l o s u r e w i t h m i n i m a l s e c u r i t y i m p a c t ( E . g . s t a c k t r a c e s , p a t h d i s c l o s u r e , d i r e c t o r y l i s t i n g s , l o g s )
● I n t e r n a l l y k n o w n i s s u e s , d u p l i c a t e i s s u e s , o r i s s u e s w h i c h h a v e a l r e a d y b e e n m a d e p u b l i c
● R a t e l i m i t i n g i s s u e s / T a b - n a b b i n g
● N o n u r l S e l f l e s s / H T M L i
● K n o w n C V E w i t h o u t p r o p e r t e s t i n g .
● V u l n e r a b i l i t i e s o n l y e x p l o i t a b l e o n o u t - o f - d a t e b r o w s e r s o r p l a t f o r m s
● C S R F i s s u e s t h a t d o n ' t i m p a c t t h e i n t e g r i t y o f a n a c c o u n t ( e . g . l o g i n o r o u t , c o n t a c t f o r m s a n d o t h e r p u b l i c l y a c c e s s i b l e f o r m s )
● V u l n e r a b i l i t i e s r e l a t e d t o a u t o - f i l l w e b f o r m s
● U s e o f k n o w n v u l n e r a b l e l i b r a r i e s w i t h o u t a c t u a l p r o o f o f c o n c e p t
● L a c k o f s e c u r i t y f l a g s i n c o o k i e s
● I s s u e s r e l a t e d t o u n s a f e S S L / T L S c i p h e r s u i t e s o r p r o t o c o l v e r s i o n
● S e s s i o n e x p i r y / C o o k i e i s s u e s / C o n t e n t s p o o f i n g
● C a c h e - c o n t r o l r e l a t e d i s s u e s
● M i s s i n g s e c u r i t y h e a d e r s t h a t d o n o t l e a d t o d i r e c t e x p l o i t a t i o n
● C S R F w i t h n e g l i g i b l e s e c u r i t y i m p a c t ( E . g . a d d i n g t o f a v o r i t e s , a d d i n g t o c a r t , s u b s c r i b i n g t o a n o n - c r i t i c a l f e a t u r e )
● V u l n e r a b i l i t i e s t h a t r e q u i r e r o o t / j a i l b r e a k
● V u l n e r a b i l i t i e s t h a t r e q u i r e p h y s i c a l a c c e s s t o a u s e r ' s d e v i c e
● I s s u e s t h a t h a v e n o s e c u r i t y i m p a c t ( E . g . F a i l u r e t o l o a d a w e b p a g e )
● P h i s h i n g ( E . g . H T T P B a s i c A u t h e n t i c a t i o n P h i s h i n g )
● A n y a c t i v i t y ( l i k e D o S / D D o S ) t h a t d i s r u p t s o u r s e r v i c e s
● I n s t a l l a t i o n P a t h P e r m i s s i o n s
● R e p o r t s f r o m a u t o m a t e d t o o l s o r s c a n s
N o t f o l l o w i n g a n y o n e o f t h e a b o v e r u l e w i l l d i s q u a l i f y y o u f r o m o u r b u g b o u n t y p r o g r a m .
I f a n y d o u b t s r e l a t e d t o y o u r s u b m i s s i o n s o r c r e a t i v e d i a l o g u e p l e a s e f e e l f r e e t o e m a i l [ e m a i l p r o t e c t e d ] or [ e m a i l p r o t e c t e d ]
P y t h o n
c U R L
R u b y