Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
4925 lines (4005 sloc) 109 KB

API V1 (Deprecated)

The REST API has endpoints for account and order management as well as public market data.

REST API ENDPOINT URL

Default

deprecated__orders_bracket

Code samples

import requests

r = requests.deprecated('https://api.delta.exchange/orders/bracket', params={

)

print r.json()
# You can also use wget
curl -X DEPRECATED https://api.delta.exchange/orders/bracket
require 'rest-client'
require 'json'

result = RestClient.deprecated 'https://api.delta.exchange/orders/bracket',
  params: {
  }

p JSON.parse(result)

DEPRECATED /orders/bracket

Responses

Status Meaning Description Schema
This operation does not require authentication.

Assets

Get Asset List

Get list of all assets

Code samples

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api.delta.exchange/assets', params={

}, headers = headers)

print r.json()
# You can also use wget
curl -X GET https://api.delta.exchange/assets \
  -H 'Accept: application/json'
require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.delta.exchange/assets',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /assets

Example responses

200 Response

[
  {
    "id": 0,
    "symbol": "string",
    "precision": 0
  }
]

Responses

Status Meaning Description Schema
200 OK List of all assets ArrayOfAssets
This operation does not require authentication.

Products

Get Product List, 24hr Ticker

Get live products

Code samples

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api.delta.exchange/products', params={

}, headers = headers)

print r.json()
# You can also use wget
curl -X GET https://api.delta.exchange/products \
  -H 'Accept: application/json'
require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.delta.exchange/products',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /products

Example responses

200 Response

[
  {
    "id": 0,
    "symbol": "string",
    "description": "string",
    "created_at": "string",
    "updated_at": "string",
    "settlement_time": "string",
    "product_type": "future",
    "pricing_source": "string",
    "impact_size": 0,
    "initial_margin": 0,
    "maintenance_margin": "string",
    "contract_value": "string",
    "contract_unit_currency": "string",
    "tick_size": "string",
    "trading_status": "operational",
    "max_leverage_notional": "string",
    "default_leverage": "string",
    "initial_margin_scaling_factor": "string",
    "maintenance_margin_scaling_factor": "string",
    "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
    },
    "quoting_asset": {
      "id": 0,
      "symbol": "string",
      "precision": 0
    },
    "settling_asset": {
      "id": 0,
      "symbol": "string",
      "precision": 0
    }
  }
]

Responses

Status Meaning Description Schema
200 OK List of live products ArrayOfProducts
This operation does not require authentication.

Get 24hr ticker

Code samples

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api.delta.exchange/products/ticker/24hr', params={
  'symbol': 'string'
}, headers = headers)

print r.json()
# You can also use wget
curl -X GET https://api.delta.exchange/products/ticker/24hr?symbol=string \
  -H 'Accept: application/json'
require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.delta.exchange/products/ticker/24hr',
  params: {
  'symbol' => 'string'
}, headers: headers

p JSON.parse(result)

GET /products/ticker/24hr

Parameters

Parameter In Type Required Description
symbol query string true product symbol

Example responses

200 Response

{
  "symbol": "string",
  "timestamp": 0,
  "open": 0,
  "high": 0,
  "low": 0,
  "close": 0,
  "volume": 0
}

Responses

Status Meaning Description Schema
200 OK Ticker Date 24hrTicker
This operation does not require authentication.

Orders

Placing Orders, Cancelling Orders, Placing batch orders, Cancelling batch orders, Get Open orders, Change Orders Leverage

Place Order

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'api-key': '****',
  'signature': '****',
  'timestamp': '****'
}

r = requests.post('https://api.delta.exchange/orders', params={

}, headers = headers)

print r.json()
# You can also use wget
curl -X POST https://api.delta.exchange/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/orders',
  params: {
  }, headers: headers

p JSON.parse(result)

POST /orders

Body parameter

{
  "product_id": 0,
  "limit_price": "string",
  "size": 0,
  "side": "buy",
  "order_type": "limit_order",
  "time_in_force": "gtc",
  "post_only": "true",
  "reduce_only": "true",
  "bracket_order": {
    "stop_loss_price": "string",
    "take_profit_price": "string",
    "trail_amount": "string"
  }
}

Parameters

Parameter In Type Required Description
body body CreateOrderRequest true Order which needs to be created

Example responses

200 Response

{
  "id": 0,
  "user_id": 0,
  "size": 0,
  "unfilled_size": 0,
  "side": "buy",
  "order_type": "limit_order",
  "limit_price": "string",
  "stop_order_type": "stop_loss_order",
  "stop_price": "string",
  "close_on_trigger": "false",
  "state": "open",
  "created_at": "string",
  "product": {
    "id": 0,
    "symbol": "string",
    "description": "string",
    "created_at": "string",
    "updated_at": "string",
    "settlement_time": "string",
    "product_type": "future",
    "pricing_source": "string",
    "impact_size": 0,
    "initial_margin": 0,
    "maintenance_margin": "string",
    "contract_value": "string",
    "contract_unit_currency": "string",
    "tick_size": "string",
    "trading_status": "operational",
    "max_leverage_notional": "string",
    "default_leverage": "string",
    "initial_margin_scaling_factor": "string",
    "maintenance_margin_scaling_factor": "string",
    "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
    },
    "quoting_asset": {
      "id": 0,
      "symbol": "string",
      "precision": 0
    },
    "settling_asset": {
      "id": 0,
      "symbol": "string",
      "precision": 0
    }
  }
}

Responses

Status Meaning Description Schema
200 OK Returns back the order object with assigned id and latest state Order
400 Bad Request Returns error if order could not be placed Inline

Response Schema

Status Code 400

Name Type Required Restrictions Description
» error string false none none
» message string false none A more verbose error message

Enumerated Values

Property Value
error InsufficientMargin
error OrderSizeExceededAvailable
error OrderExceedsSizeLimit
error OrderLeverageNotSet
error InvalidProduct
error ImmediateLiquidationOrder
error LowerthanBankruptcy
error SelfMatchingPostOnlyMode
error ImmediateExecutionPostOnlyOrder
error BracketOrderPositionExists
error InvalidBracketOrder
To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

Cancel Order

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'api-key': '****',
  'signature': '****',
  'timestamp': '****'
}

r = requests.delete('https://api.delta.exchange/orders', params={

}, headers = headers)

print r.json()
# You can also use wget
curl -X DELETE https://api.delta.exchange/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/orders',
  params: {
  }, headers: headers

p JSON.parse(result)

DELETE /orders

Body parameter

{
  "id": 0,
  "product_id": 0
}

Parameters

Parameter In Type Required Description
body body DeleteOrderRequest true Order which needs to be cancelled

Example responses

200 Response

{
  "id": 0,
  "user_id": 0,
  "size": 0,
  "unfilled_size": 0,
  "side": "buy",
  "order_type": "limit_order",
  "limit_price": "string",
  "stop_order_type": "stop_loss_order",
  "stop_price": "string",
  "close_on_trigger": "false",
  "state": "open",
  "created_at": "string",
  "product": {
    "id": 0,
    "symbol": "string",
    "description": "string",
    "created_at": "string",
    "updated_at": "string",
    "settlement_time": "string",
    "product_type": "future",
    "pricing_source": "string",
    "impact_size": 0,
    "initial_margin": 0,
    "maintenance_margin": "string",
    "contract_value": "string",
    "contract_unit_currency": "string",
    "tick_size": "string",
    "trading_status": "operational",
    "max_leverage_notional": "string",
    "default_leverage": "string",
    "initial_margin_scaling_factor": "string",
    "maintenance_margin_scaling_factor": "string",
    "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
    },
    "quoting_asset": {
      "id": 0,
      "symbol": "string",
      "precision": 0
    },
    "settling_asset": {
      "id": 0,
      "symbol": "string",
      "precision": 0
    }
  }
}

Responses

Status Meaning Description Schema
200 OK Returns back the order object Order
400 Bad Request Returns error if order could not be cancelled Inline

Response Schema

Status Code 400

Name Type Required Restrictions Description
» error string false none none
» message string false none A more verbose error message

Enumerated Values

Property Value
error ALREADY_FILLED
error InvalidOrder
error InvalidProduct
To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

Get Orders

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'api-key': '****',
  'signature': '****',
  'timestamp': '****'
}

r = requests.get('https://api.delta.exchange/orders', params={

}, headers = headers)

print r.json()
# You can also use wget
curl -X GET https://api.delta.exchange/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/orders',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /orders

Parameters

Parameter In Type Required Description
product_id query integer false get orders for a particular product id
state query string false get orders with a particular state
stop_order_type query string false get stop orders with stop_order_type
page_num query integer false page number for pagination
page_size query integer false page size for pagination

Enumerated Values

Parameter Value
state open
state closed
state cancelled
stop_order_type stop_loss_order

Example responses

200 Response

[
  {
    "id": 0,
    "user_id": 0,
    "size": 0,
    "unfilled_size": 0,
    "side": "buy",
    "order_type": "limit_order",
    "limit_price": "string",
    "stop_order_type": "stop_loss_order",
    "stop_price": "string",
    "close_on_trigger": "false",
    "state": "open",
    "created_at": "string",
    "product": {
      "id": 0,
      "symbol": "string",
      "description": "string",
      "created_at": "string",
      "updated_at": "string",
      "settlement_time": "string",
      "product_type": "future",
      "pricing_source": "string",
      "impact_size": 0,
      "initial_margin": 0,
      "maintenance_margin": "string",
      "contract_value": "string",
      "contract_unit_currency": "string",
      "tick_size": "string",
      "trading_status": "operational",
      "max_leverage_notional": "string",
      "default_leverage": "string",
      "initial_margin_scaling_factor": "string",
      "maintenance_margin_scaling_factor": "string",
      "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
      },
      "quoting_asset": {
        "id": 0,
        "symbol": "string",
        "precision": 0
      },
      "settling_asset": {
        "id": 0,
        "symbol": "string",
        "precision": 0
      }
    }
  }
]

Responses

Status Meaning Description Schema
200 OK List of orders as per the query ArrayOfOrders
To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

Edit Order

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'api-key': '****',
  'signature': '****',
  'timestamp': '****'
}

r = requests.put('https://api.delta.exchange/orders', params={

}, headers = headers)

print r.json()
# You can also use wget
curl -X PUT https://api.delta.exchange/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/orders',
  params: {
  }, headers: headers

p JSON.parse(result)

PUT /orders

Body parameter

{
  "id": 0,
  "product_id": 0,
  "limit_price": "string",
  "size": 0
}

Parameters

Parameter In Type Required Description
body body EditOrderRequest true Order which needs to be edited

Example responses

200 Response

{
  "id": 0,
  "user_id": 0,
  "size": 0,
  "unfilled_size": 0,
  "side": "buy",
  "order_type": "limit_order",
  "limit_price": "string",
  "stop_order_type": "stop_loss_order",
  "stop_price": "string",
  "close_on_trigger": "false",
  "state": "open",
  "created_at": "string",
  "product": {
    "id": 0,
    "symbol": "string",
    "description": "string",
    "created_at": "string",
    "updated_at": "string",
    "settlement_time": "string",
    "product_type": "future",
    "pricing_source": "string",
    "impact_size": 0,
    "initial_margin": 0,
    "maintenance_margin": "string",
    "contract_value": "string",
    "contract_unit_currency": "string",
    "tick_size": "string",
    "trading_status": "operational",
    "max_leverage_notional": "string",
    "default_leverage": "string",
    "initial_margin_scaling_factor": "string",
    "maintenance_margin_scaling_factor": "string",
    "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
    },
    "quoting_asset": {
      "id": 0,
      "symbol": "string",
      "precision": 0
    },
    "settling_asset": {
      "id": 0,
      "symbol": "string",
      "precision": 0
    }
  }
}

Responses

Status Meaning Description Schema
200 OK Returns back the order object with assigned id and latest state Order
400 Bad Request Returns error if order could not be placed Inline

Response Schema

Status Code 400

Name Type Required Restrictions Description
» error string false none none
» message string false none A more verbose error message

Enumerated Values

Property Value
error InsufficientMargin
error OrderSizeExceededAvailable
error OrderExceedsSizeLimit
error OrderLeverageNotSet
error InvalidProduct
error ImmediateLiquidationOrder
error LowerthanBankruptcy
error SelfMatchingPostOnlyMode
error ImmediateExecutionPostOnlyOrder
To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

Cancel all open orders

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'api-key': '****',
  'signature': '****',
  'timestamp': '****'
}

r = requests.delete('https://api.delta.exchange/orders/all', params={

}, headers = headers)

print r.json()
# You can also use wget
curl -X DELETE https://api.delta.exchange/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/orders/all',
  params: {
  }, headers: headers

p JSON.parse(result)

DELETE /orders/all

Body parameter

{
  "product_id": 0,
  "cancel_limit_orders": "true",
  "cancel_stop_orders": "true"
}

Parameters

Parameter In Type Required Description
body body CancelAllFilterObject false Filters for selecting orders that needs to be cancelled

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK returns back success response Inline
400 Bad Request Returns error if orders could not be cancelled Inline

Response Schema

Status Code 400

Name Type Required Restrictions Description
» error string false none none
» message string false none A more verbose error message

Enumerated Values

Property Value
error InvalidProduct
To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

Place Bracket Order DEPRECATED

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'api-key': '****',
  'signature': '****',
  'timestamp': '****'
}

r = requests.post('https://api.delta.exchange/orders/bracket', params={

}, headers = headers)

print r.json()
# You can also use wget
curl -X POST https://api.delta.exchange/orders/bracket \
  -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/orders/bracket',
  params: {
  }, headers: headers

p JSON.parse(result)

POST /orders/bracket

Body parameter

{
  "product_id": 0,
  "stop_loss_order": {
    "order_type": "market_order",
    "stop_price": "string"
  },
  "take_profit_order": {
    "order_type": "market_order",
    "stop_price": "string"
  }
}

Parameters

Parameter In Type Required Description
body body CreateBracketOrderRequest true Bracket order which needs to be created

Example responses

200 Response

{
  "stop_loss_order": {
    "id": 0,
    "user_id": 0,
    "size": 0,
    "unfilled_size": 0,
    "side": "buy",
    "order_type": "limit_order",
    "limit_price": "string",
    "stop_order_type": "stop_loss_order",
    "stop_price": "string",
    "close_on_trigger": "false",
    "state": "open",
    "created_at": "string",
    "product": {
      "id": 0,
      "symbol": "string",
      "description": "string",
      "created_at": "string",
      "updated_at": "string",
      "settlement_time": "string",
      "product_type": "future",
      "pricing_source": "string",
      "impact_size": 0,
      "initial_margin": 0,
      "maintenance_margin": "string",
      "contract_value": "string",
      "contract_unit_currency": "string",
      "tick_size": "string",
      "trading_status": "operational",
      "max_leverage_notional": "string",
      "default_leverage": "string",
      "initial_margin_scaling_factor": "string",
      "maintenance_margin_scaling_factor": "string",
      "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
      },
      "quoting_asset": {
        "id": 0,
        "symbol": "string",
        "precision": 0
      },
      "settling_asset": {
        "id": 0,
        "symbol": "string",
        "precision": 0
      }
    }
  },
  "take_profit_order": {
    "id": 0,
    "user_id": 0,
    "size": 0,
    "unfilled_size": 0,
    "side": "buy",
    "order_type": "limit_order",
    "limit_price": "string",
    "stop_order_type": "stop_loss_order",
    "stop_price": "string",
    "close_on_trigger": "false",
    "state": "open",
    "created_at": "string",
    "product": {
      "id": 0,
      "symbol": "string",
      "description": "string",
      "created_at": "string",
      "updated_at": "string",
      "settlement_time": "string",
      "product_type": "future",
      "pricing_source": "string",
      "impact_size": 0,
      "initial_margin": 0,
      "maintenance_margin": "string",
      "contract_value": "string",
      "contract_unit_currency": "string",
      "tick_size": "string",
      "trading_status": "operational",
      "max_leverage_notional": "string",
      "default_leverage": "string",
      "initial_margin_scaling_factor": "string",
      "maintenance_margin_scaling_factor": "string",
      "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
      },
      "quoting_asset": {
        "id": 0,
        "symbol": "string",
        "precision": 0
      },
      "settling_asset": {
        "id": 0,
        "symbol": "string",
        "precision": 0
      }
    }
  }
}

Responses

Status Meaning Description Schema
200 OK Returns back the stop loss and take profit orders with assigned ids and latest states BracketOrder
400 Bad Request Returns error if order could not be placed Inline

Response Schema

Status Code 400

Name Type Required Restrictions Description
» error string false none none
» message string false none A more verbose error message

Enumerated Values

Property Value
error ImmediateExecutionStopOrder
error CloseOnTriggerExists
error NoOpenPosition
To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

Create batch orders

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'api-key': '****',
  'signature': '****',
  'timestamp': '****'
}

r = requests.post('https://api.delta.exchange/orders/batch', params={

}, headers = headers)

print r.json()
# You can also use wget
curl -X POST https://api.delta.exchange/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/orders/batch',
  params: {
  }, headers: headers

p JSON.parse(result)

POST /orders/batch

Body parameter

[
  {
    "product_id": 0,
    "limit_price": "string",
    "size": 0,
    "side": "buy",
    "order_type": "limit_order",
    "time_in_force": "gtc",
    "post_only": "true",
    "reduce_only": "true",
    "bracket_order": {
      "stop_loss_price": "string",
      "take_profit_price": "string",
      "trail_amount": "string"
    }
  }
]

Parameters

Parameter In Type Required Description
body body ArrayOfCreateOrderRequest 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

Example responses

200 Response

{
  "id": 0,
  "user_id": 0,
  "size": 0,
  "unfilled_size": 0,
  "side": "buy",
  "order_type": "limit_order",
  "limit_price": "string",
  "stop_order_type": "stop_loss_order",
  "stop_price": "string",
  "close_on_trigger": "false",
  "state": "open",
  "created_at": "string",
  "product": {
    "id": 0,
    "symbol": "string",
    "description": "string",
    "created_at": "string",
    "updated_at": "string",
    "settlement_time": "string",
    "product_type": "future",
    "pricing_source": "string",
    "impact_size": 0,
    "initial_margin": 0,
    "maintenance_margin": "string",
    "contract_value": "string",
    "contract_unit_currency": "string",
    "tick_size": "string",
    "trading_status": "operational",
    "max_leverage_notional": "string",
    "default_leverage": "string",
    "initial_margin_scaling_factor": "string",
    "maintenance_margin_scaling_factor": "string",
    "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
    },
    "quoting_asset": {
      "id": 0,
      "symbol": "string",
      "precision": 0
    },
    "settling_asset": {
      "id": 0,
      "symbol": "string",
      "precision": 0
    }
  }
}

Responses

Status Meaning Description Schema
200 OK returns the orders placed Order
400 Bad Request returns error if orders couldnt be placed Inline

Response Schema

Status Code 400

Name Type Required Restrictions Description
» error string false none none
» message string false none A more verbose error message

Enumerated Values

Property Value
error InsufficientMargin
error OrderSizeExceededAvailable
error OrderExceedsSizeLimit
error OrderLeverageNotSet
error InvalidProduct
error ImmediateLiquidationOrder
error LowerthanBankruptcy
To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

Edit batch orders

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'api-key': '****',
  'signature': '****',
  'timestamp': '****'
}

r = requests.put('https://api.delta.exchange/orders/batch', params={

}, headers = headers)

print r.json()
# You can also use wget
curl -X PUT https://api.delta.exchange/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/orders/batch',
  params: {
  }, headers: headers

p JSON.parse(result)

PUT /orders/batch

batch order edit

Body parameter

{
  "product_id": 0,
  "orders": [
    {
      "id": 0,
      "size": 0,
      "limit_price": "string",
      "product_id": 0
    }
  ]
}

Parameters

Parameter In Type Required Description
body body EditBatchOrders true none

Example responses

400 Response

{
  "error": "InsufficientMargin",
  "message": "string"
}

Responses

Status Meaning Description Schema
200 OK OK None
400 Bad Request returns error if orders couldnt be edited Inline

Response Schema

Status Code 400

Name Type Required Restrictions Description
» error string false none none
» message string false none A more verbose error message

Enumerated Values

Property Value
error InsufficientMargin
error OrderSizeExceededAvailable
error OrderExceedsSizeLimit
error OrderLeverageNotSet
error InvalidProduct
error ImmediateLiquidationOrder
error LowerthanBankruptcy
To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

Delele batch orders

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'api-key': '****',
  'signature': '****',
  'timestamp': '****'
}

r = requests.delete('https://api.delta.exchange/orders/batch', params={

}, headers = headers)

print r.json()
# You can also use wget
curl -X DELETE https://api.delta.exchange/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/orders/batch',
  params: {
  }, headers: headers

p JSON.parse(result)

DELETE /orders/batch

Body parameter

[
  {
    "id": 0,
    "product_id": 0
  }
]

Parameters

Parameter In Type Required Description
body body ArrayOfDeleteOrderRequest true none

Example responses

200 Response

{
  "id": 0,
  "user_id": 0,
  "size": 0,
  "unfilled_size": 0,
  "side": "buy",
  "order_type": "limit_order",
  "limit_price": "string",
  "stop_order_type": "stop_loss_order",
  "stop_price": "string",
  "close_on_trigger": "false",
  "state": "open",
  "created_at": "string",
  "product": {
    "id": 0,
    "symbol": "string",
    "description": "string",
    "created_at": "string",
    "updated_at": "string",
    "settlement_time": "string",
    "product_type": "future",
    "pricing_source": "string",
    "impact_size": 0,
    "initial_margin": 0,
    "maintenance_margin": "string",
    "contract_value": "string",
    "contract_unit_currency": "string",
    "tick_size": "string",
    "trading_status": "operational",
    "max_leverage_notional": "string",
    "default_leverage": "string",
    "initial_margin_scaling_factor": "string",
    "maintenance_margin_scaling_factor": "string",
    "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
    },
    "quoting_asset": {
      "id": 0,
      "symbol": "string",
      "precision": 0
    },
    "settling_asset": {
      "id": 0,
      "symbol": "string",
      "precision": 0
    }
  }
}

Responses

Status Meaning Description Schema
200 OK returns the orders deleted Order
400 Bad Request returns error if orders couldnt be deleted Inline

Response Schema

Status Code 400

Name Type Required Restrictions Description
» error string false none none
» message string false none A more verbose error message

Enumerated Values

Property Value
error ALREADY_FILLED
error InvalidOrder
error InvalidProduct
To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

Change order leverage

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': '*/*',
  'api-key': '****',
  'signature': '****',
  'timestamp': '****'
}

r = requests.post('https://api.delta.exchange/orders/leverage', params={

}, headers = headers)

print r.json()
# You can also use wget
curl -X POST https://api.delta.exchange/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/orders/leverage',
  params: {
  }, headers: headers

p JSON.parse(result)

POST /orders/leverage

Body parameter

{
  "product_id": 0,
  "leverage": "string"
}

Parameters

Parameter In Type Required Description
body body object true none
» product_id body integer true none
» leverage body string true none

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK returns the OrderLeverage object OrderLeverage
400 Bad Request Returns error if leverage couldnt be changed Inline

Response Schema

Status Code 400

Name Type Required Restrictions Description
» error string false none none
» message string false none A more verbose error message

Enumerated Values

Property Value
error InsufficientMargin
error LeverageLimitExceeded
To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

Get order leverage

Code samples

import requests
headers = {
  'Accept': '*/*',
  'api-key': '****',
  'signature': '****',
  'timestamp': '****'
}

r = requests.get('https://api.delta.exchange/orders/leverage', params={
  'product_id': '0'
}, headers = headers)

print r.json()
# You can also use wget
curl -X GET https://api.delta.exchange/orders/leverage?product_id=0 \
  -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/orders/leverage',
  params: {
  'product_id' => 'integer'
}, headers: headers

p JSON.parse(result)

GET /orders/leverage

Parameters

Parameter In Type Required Description
product_id query integer true none

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK returns the OrderLeverage object OrderLeverage
To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

Positions

Get Open positions, Change Position Margin, Close Position

Get open positions

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'api-key': '****',
  'signature': '****',
  'timestamp': '****'
}

r = requests.get('https://api.delta.exchange/positions', params={

}, headers = headers)

print r.json()
# You can also use wget
curl -X GET https://api.delta.exchange/positions \
  -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/positions',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /positions

Example responses

200 Response

[
  {
    "user_id": 0,
    "size": 0,
    "entry_price": "string",
    "margin": "string",
    "liquidation_price": "string",
    "bankruptcy_price": "string",
    "adl_level": 0,
    "product": {
      "id": 0,
      "symbol": "string",
      "description": "string",
      "created_at": "string",
      "updated_at": "string",
      "settlement_time": "string",
      "product_type": "future",
      "pricing_source": "string",
      "impact_size": 0,
      "initial_margin": 0,
      "maintenance_margin": "string",
      "contract_value": "string",
      "contract_unit_currency": "string",
      "tick_size": "string",
      "trading_status": "operational",
      "max_leverage_notional": "string",
      "default_leverage": "string",
      "initial_margin_scaling_factor": "string",
      "maintenance_margin_scaling_factor": "string",
      "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
      },
      "quoting_asset": {
        "id": 0,
        "symbol": "string",
        "precision": 0
      },
      "settling_asset": {
        "id": 0,
        "symbol": "string",
        "precision": 0
      }
    }
  }
]

Responses

Status Meaning Description Schema
200 OK List of all open positions ArrayOfPositions
To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

Add/Remove position margin

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'api-key': '****',
  'signature': '****',
  'timestamp': '****'
}

r = requests.post('https://api.delta.exchange/positions/change_margin', params={

}, headers = headers)

print r.json()
# You can also use wget
curl -X POST https://api.delta.exchange/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/positions/change_margin',
  params: {
  }, headers: headers

p JSON.parse(result)

POST /positions/change_margin

Body parameter

{
  "product_id": 0,
  "delta_margin": "string"
}

Parameters

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

Example responses

200 Response

{
  "user_id": 0,
  "size": 0,
  "entry_price": "string",
  "margin": "string",
  "liquidation_price": "string",
  "bankruptcy_price": "string",
  "adl_level": 0,
  "product": {
    "id": 0,
    "symbol": "string",
    "description": "string",
    "created_at": "string",
    "updated_at": "string",
    "settlement_time": "string",
    "product_type": "future",
    "pricing_source": "string",
    "impact_size": 0,
    "initial_margin": 0,
    "maintenance_margin": "string",
    "contract_value": "string",
    "contract_unit_currency": "string",
    "tick_size": "string",
    "trading_status": "operational",
    "max_leverage_notional": "string",
    "default_leverage": "string",
    "initial_margin_scaling_factor": "string",
    "maintenance_margin_scaling_factor": "string",
    "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
    },
    "quoting_asset": {
      "id": 0,
      "symbol": "string",
      "precision": 0
    },
    "settling_asset": {
      "id": 0,
      "symbol": "string",
      "precision": 0
    }
  }
}

Responses

Status Meaning Description Schema
200 OK returns the position object Position
400 Bad Request Returns error if position margin could not be changed Inline

Response Schema

Status Code 400

Name Type Required Restrictions Description
» error string false none none
» message string false none A more verbose error message

Enumerated Values

Property Value
error PositionNotSet
error LeverageLimitExceeded
error InsufficientMargin
error ExistingOrderWithLowerThanBankruptcy
To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

Trade History

Get Orders History, Get Fill History

Get order history (cancelled and closed)

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'api-key': '****',
  'signature': '****',
  'timestamp': '****'
}

r = requests.get('https://api.delta.exchange/orders/history', params={

}, headers = headers)

print r.json()
# You can also use wget
curl -X GET https://api.delta.exchange/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/orders/history',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /orders/history

Parameters

Parameter In Type Required Description
page_num query integer false page number for pagination
page_size query integer false page size for pagination

Example responses

200 Response

[
  {
    "id": 0,
    "user_id": 0,
    "size": 0,
    "unfilled_size": 0,
    "side": "buy",
    "order_type": "limit_order",
    "limit_price": "string",
    "stop_order_type": "stop_loss_order",
    "stop_price": "string",
    "close_on_trigger": "false",
    "state": "open",
    "created_at": "string",
    "product": {
      "id": 0,
      "symbol": "string",
      "description": "string",
      "created_at": "string",
      "updated_at": "string",
      "settlement_time": "string",
      "product_type": "future",
      "pricing_source": "string",
      "impact_size": 0,
      "initial_margin": 0,
      "maintenance_margin": "string",
      "contract_value": "string",
      "contract_unit_currency": "string",
      "tick_size": "string",
      "trading_status": "operational",
      "max_leverage_notional": "string",
      "default_leverage": "string",
      "initial_margin_scaling_factor": "string",
      "maintenance_margin_scaling_factor": "string",
      "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
      },
      "quoting_asset": {
        "id": 0,
        "symbol": "string",
        "precision": 0
      },
      "settling_asset": {
        "id": 0,
        "symbol": "string",
        "precision": 0
      }
    }
  }
]

Responses

Status Meaning Description Schema
200 OK List of orders ArrayOfOrders
To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

Get fills

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'api-key': '****',
  'signature': '****',
  'timestamp': '****'
}

r = requests.get('https://api.delta.exchange/fills', params={

}, headers = headers)

print r.json()
# You can also use wget
curl -X GET https://api.delta.exchange/fills \
  -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/fills',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /fills

Parameters

Parameter In Type Required Description
product_id query integer false product id for fill query
start_time query integer false Start time for the fill query
end_time query integer false End time for the fill query
page_num query integer false page number for pagination
page_size query integer false page size for pagination

Example responses

200 Response

[
  {
    "id": 0,
    "size": 0,
    "side": "buy",
    "price": "string",
    "role": "taker",
    "commission": "string",
    "created_at": "string",
    "product": {
      "id": 0,
      "symbol": "string",
      "description": "string",
      "created_at": "string",
      "updated_at": "string",
      "settlement_time": "string",
      "product_type": "future",
      "pricing_source": "string",
      "impact_size": 0,
      "initial_margin": 0,
      "maintenance_margin": "string",
      "contract_value": "string",
      "contract_unit_currency": "string",
      "tick_size": "string",
      "trading_status": "operational",
      "max_leverage_notional": "string",
      "default_leverage": "string",
      "initial_margin_scaling_factor": "string",
      "maintenance_margin_scaling_factor": "string",
      "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
      },
      "quoting_asset": {
        "id": 0,
        "symbol": "string",
        "precision": 0
      },
      "settling_asset": {
        "id": 0,
        "symbol": "string",
        "precision": 0
      }
    }
  }
]

Responses

Status Meaning Description Schema
200 OK List of Fills ArrayOfFills
To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

Orderbook

L2Orderbook

Get L2 orderbook

Code samples

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api.delta.exchange/orderbook/{product_id}/l2', params={

}, headers = headers)

print r.json()
# You can also use wget
curl -X GET https://api.delta.exchange/orderbook/{product_id}/l2 \
  -H 'Accept: application/json'
require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.delta.exchange/orderbook/{product_id}/l2',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /orderbook/{product_id}/l2

Parameters

Parameter In Type Required Description
product_id path integer true none
depth query integer false number of levels on each side

Example responses

200 Response

{
  "buy_book": [
    {
      "price": "string",
      "size": 0
    }
  ],
  "sell_book": [
    {
      "price": "string",
      "size": 0
    }
  ],
  "recent_trades": [
    {
      "side": "buy",
      "size": 0,
      "price": "string",
      "timestamp": 0
    }
  ],
  "spot_price": "string",
  "mark_price": "string",
  "product_id": 0
}

Responses

Status Meaning Description Schema
200 OK L2 orderbook for the product L2Orderbook
This operation does not require authentication.

Wallet

Get balances, Get transaction history

Get Wallet Balances

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'api-key': '****',
  'signature': '****',
  'timestamp': '****'
}

r = requests.get('https://api.delta.exchange/wallet/balances', params={

}, headers = headers)

print r.json()
# You can also use wget
curl -X GET https://api.delta.exchange/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/wallet/balances',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /wallet/balances

Example responses

200 Response

[
  {
    "balance": "string",
    "order_margin": "string",
    "position_margin": "string",
    "commission": "string",
    "available_balance": "string",
    "asset": {
      "id": 0,
      "symbol": "string",
      "precision": 0
    }
  }
]

Responses

Status Meaning Description Schema
200 OK List of wallets attached to the user account ArrayOfWallets
To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

Get Wallet transactions

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'api-key': '****',
  'signature': '****',
  'timestamp': '****'
}

r = requests.get('https://api.delta.exchange/wallet/transactions', params={
  'asset_id': '0'
}, headers = headers)

print r.json()
# You can also use wget
curl -X GET https://api.delta.exchange/wallet/transactions?asset_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/wallet/transactions',
  params: {
  'asset_id' => 'integer'
}, headers: headers

p JSON.parse(result)

GET /wallet/transactions

Parameters

Parameter In Type Required Description
asset_id query integer true asset_id for that particular Wallet
product_id query integer false product_id filter for the transaction query
transaction_type query integer false transaction_type filter for the transaction query
start_time query integer false Start time for the transaction query
end_time query integer false End time for the transaction query
page_num query integer false page number for pagination
page_size query integer false page size for pagination

Example responses

200 Response

[
  {
    "id": 0,
    "amount": "string",
    "balance": "string",
    "transaction_type": "pnl",
    "meta_data": {},
    "product": {
      "id": 0,
      "symbol": "string",
      "description": "string",
      "created_at": "string",
      "updated_at": "string",
      "settlement_time": "string",
      "product_type": "future",
      "pricing_source": "string",
      "impact_size": 0,
      "initial_margin": 0,
      "maintenance_margin": "string",
      "contract_value": "string",
      "contract_unit_currency": "string",
      "tick_size": "string",
      "trading_status": "operational",
      "max_leverage_notional": "string",
      "default_leverage": "string",
      "initial_margin_scaling_factor": "string",
      "maintenance_margin_scaling_factor": "string",
      "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
      },
      "quoting_asset": {
        "id": 0,
        "symbol": "string",
        "precision": 0
      },
      "settling_asset": {
        "id": 0,
        "symbol": "string",
        "precision": 0
      }
    },
    "created_at": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK list of transactions for that wallet ArrayOfTransactions
To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

Download Wallet transactions

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'api-key': '****',
  'signature': '****',
  'timestamp': '****'
}

r = requests.get('https://api.delta.exchange/wallet/download/transactions', params={
  'asset_id': '0'
}, headers = headers)

print r.json()
# You can also use wget
curl -X GET https://api.delta.exchange/wallet/download/transactions?asset_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/wallet/download/transactions',
  params: {
  'asset_id' => 'integer'
}, headers: headers

p JSON.parse(result)

GET /wallet/download/transactions

Parameters

Parameter In Type Required Description
asset_id query integer true asset_id for that particular Wallet
product_id query integer false product_id filter for the transaction query
transaction_type query integer false transaction_type filter for the transaction query
start_time query integer false Start time for the transaction query
end_time query integer false End time for the transaction query

Example responses

200 Response

[
  {
    "id": 0,
    "amount": "string",
    "balance": "string",
    "transaction_type": "pnl",
    "meta_data": {},
    "product": {
      "id": 0,
      "symbol": "string",
      "description": "string",
      "created_at": "string",
      "updated_at": "string",
      "settlement_time": "string",
      "product_type": "future",
      "pricing_source": "string",
      "impact_size": 0,
      "initial_margin": 0,
      "maintenance_margin": "string",
      "contract_value": "string",
      "contract_unit_currency": "string",
      "tick_size": "string",
      "trading_status": "operational",
      "max_leverage_notional": "string",
      "default_leverage": "string",
      "initial_margin_scaling_factor": "string",
      "maintenance_margin_scaling_factor": "string",
      "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
      },
      "quoting_asset": {
        "id": 0,
        "symbol": "string",
        "precision": 0
      },
      "settling_asset": {
        "id": 0,
        "symbol": "string",
        "precision": 0
      }
    },
    "created_at": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK csv of transactions for that wallet ArrayOfTransactions
To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

Raise withdrawals request

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'api-key': '****',
  'signature': '****',
  'timestamp': '****'
}

r = requests.post('https://api.delta.exchange/wallet/withdrawals', params={

}, headers = headers)

print r.json()
# You can also use wget
curl -X POST https://api.delta.exchange/wallet/withdrawals \
  -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/wallet/withdrawals',
  params: {
  }, headers: headers

p JSON.parse(result)

POST /wallet/withdrawals

Body parameter

{
  "release_promo_credit": "string",
  "amount": "string",
  "address": "string"
}

Parameters

Parameter In Type Required Description
body body object true none
» release_promo_credit body string false none
» amount body string true none
» address body string true none

Example responses

200 Response

{
  "address": "string",
  "amount": "string",
  "fee": "string",
  "id": 0,
  "state": "string",
  "transaction_meta": "string",
  "user_id": 0
}

Responses

Status Meaning Description Schema
200 OK returns the WithdrawalsResponse object WithdrawalsResponse
400 Bad Request Returns error if Withdrawal limit exceeded, ammount or address is missing or invalid Inline

Response Schema

Status Code 400

Name Type Required Restrictions Description
» error string false none none
» message string false none A more verbose error message

Enumerated Values

Property Value
error WithdrawalLimitExceeded
To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

Cancel withdrawals request

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'api-key': '****',
  'signature': '****',
  'timestamp': '****'
}

r = requests.post('https://api.delta.exchange/wallet/withdrawals/cancel', params={

}, headers = headers)

print r.json()
# You can also use wget
curl -X POST https://api.delta.exchange/wallet/withdrawals/cancel \
  -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/wallet/withdrawals/cancel',
  params: {
  }, headers: headers

p JSON.parse(result)

POST /wallet/withdrawals/cancel

Body parameter

{
  "withdrawal_id": 0
}

Parameters

Parameter In Type Required Description
body body object true none
» withdrawal_id body integer true none

Example responses

200 Response

{
  "success": true
}

Responses

Status Meaning Description Schema
200 OK returns success true or false Inline
400 Bad Request Returns error if Withdrawal Withdrawal Already Processed Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none

Status Code 400

Name Type Required Restrictions Description
» error string false none none
» message string false none A more verbose error message

Enumerated Values

Property Value
error WithdrawalAlreadyProcessed
To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

OHLC Candles

Get OHLC candles

Code samples

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api.delta.exchange/chart/history', params={
  'symbol': 'string',  'from': '0',  'to': '0',  'resolution': '1'
}, headers = headers)

print r.json()
# You can also use wget
curl -X GET https://api.delta.exchange/chart/history?symbol=string&from=0&to=0&resolution=1 \
  -H 'Accept: application/json'
require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.delta.exchange/chart/history',
  params: {
  'symbol' => 'string',
'from' => 'integer',
'to' => 'integer',
'resolution' => 'string'
}, headers: headers

p JSON.parse(result)

GET /chart/history

Parameters

Parameter In Type Required Description
symbol query string true symbol should be anyone of following 1. product symbol to get OHLC for given product e.g BTCUSD 2. Spot index symbol to get spot index price. e.g. .DEXBTUSD 3. Mark and symbol to get mark price OHLC data e.g. MARK:BTCUSD 4. Funding and product symbol to get Funding data for given product e.g. FUNDING:BTCUSD
from query integer true start time for the interval ( in seconds )
to query integer true end time for the interval ( in seconds )
resolution query string true resolution for the candles

Enumerated Values

Parameter Value
resolution 1
resolution 3
resolution 5
resolution 15
resolution 30
resolution 60
resolution 120
resolution 240
resolution 360
resolution D
resolution 7D
resolution 30D
resolution 1W
resolution 2W

Example responses

200 Response

{
  "t": [
    0
  ],
  "o": [
    "string"
  ],
  "h": [
    "string"
  ],
  "l": [
    "string"
  ],
  "c": [
    "string"
  ],
  "v": [
    0
  ]
}

Responses

Status Meaning Description Schema
200 OK OHLC candles OHLCData
This operation does not require authentication.

Schemas

Asset

{
  "id": 0,
  "symbol": "string",
  "precision": 0
}

Properties

Name Type Required Restrictions Description
id integer(int64) false none none
symbol string false none none
precision integer false none none

ArrayOfAssets

[
  {
    "id": 0,
    "symbol": "string",
    "precision": 0
  }
]

Properties

Name Type Required Restrictions Description
anonymous [Asset] false none none

Product

{
  "id": 0,
  "symbol": "string",
  "description": "string",
  "created_at": "string",
  "updated_at": "string",
  "settlement_time": "string",
  "product_type": "future",
  "pricing_source": "string",
  "impact_size": 0,
  "initial_margin": 0,
  "maintenance_margin": "string",
  "contract_value": "string",
  "contract_unit_currency": "string",
  "tick_size": "string",
  "trading_status": "operational",
  "max_leverage_notional": "string",
  "default_leverage": "string",
  "initial_margin_scaling_factor": "string",
  "maintenance_margin_scaling_factor": "string",
  "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
  },
  "quoting_asset": {
    "id": 0,
    "symbol": "string",
    "precision": 0
  },
  "settling_asset": {
    "id": 0,
    "symbol": "string",
    "precision": 0
  }
}

Properties

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
product_type string false none contract type 'future' or 'inverse_future'
pricing_source string false none source and method of contract pricing
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.
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
commission_rate string false none rate at which commission fee will be calculated for a 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 he 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

Enumerated Values

Property Value
product_type future
product_type inverse_future
trading_status operational
trading_status disrupted_cancel_only
trading_status disrupted_post_only

ArrayOfProducts

[
  {
    "id": 0,
    "symbol": "string",
    "description": "string",
    "created_at": "string",
    "updated_at": "string",
    "settlement_time": "string",
    "product_type": "future",
    "pricing_source": "string",
    "impact_size": 0,
    "initial_margin": 0,
    "maintenance_margin": "string",
    "contract_value": "string",
    "contract_unit_currency": "string",
    "tick_size": "string",
    "trading_status": "operational",
    "max_leverage_notional": "string",
    "default_leverage": "string",
    "initial_margin_scaling_factor": "string",
    "maintenance_margin_scaling_factor": "string",
    "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
    },
    "quoting_asset": {
      "id": 0,
      "symbol": "string",
      "precision": 0
    },
    "settling_asset": {
      "id": 0,
      "symbol": "string",
      "precision": 0
    }
  }
]

Properties

Name Type Required Restrictions Description
anonymous [Product] false none none

Order

{
  "id": 0,
  "user_id": 0,
  "size": 0,
  "unfilled_size": 0,
  "side": "buy",
  "order_type": "limit_order",
  "limit_price": "string",
  "stop_order_type": "stop_loss_order",
  "stop_price": "string",
  "close_on_trigger": "false",
  "state": "open",
  "created_at": "string",
  "product": {
    "id": 0,
    "symbol": "string",
    "description": "string",
    "created_at": "string",
    "updated_at": "string",
    "settlement_time": "string",
    "product_type": "future",
    "pricing_source": "string",
    "impact_size": 0,
    "initial_margin": 0,
    "maintenance_margin": "string",
    "contract_value": "string",
    "contract_unit_currency": "string",
    "tick_size": "string",
    "trading_status": "operational",
    "max_leverage_notional": "string",
    "default_leverage": "string",
    "initial_margin_scaling_factor": "string",
    "maintenance_margin_scaling_factor": "string",
    "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
    },
    "quoting_asset": {
      "id": 0,
      "symbol": "string",
      "precision": 0
    },
    "settling_asset": {
      "id": 0,
      "symbol": "string",
      "precision": 0
    }
  }
}

An Order object

Properties

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
close_on_trigger string false none none
state string false none Order Status
created_at string false none none
product Product false none none

Enumerated Values

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

ArrayOfOrders

[
  {
    "id": 0,
    "user_id": 0,
    "size": 0,
    "unfilled_size": 0,
    "side": "buy",
    "order_type": "limit_order",
    "limit_price": "string",
    "stop_order_type": "stop_loss_order",
    "stop_price": "string",
    "close_on_trigger": "false",
    "state": "open",
    "created_at": "string",
    "product": {
      "id": 0,
      "symbol": "string",
      "description": "string",
      "created_at": "string",
      "updated_at": "string",
      "settlement_time": "string",
      "product_type": "future",
      "pricing_source": "string",
      "impact_size": 0,
      "initial_margin": 0,
      "maintenance_margin": "string",
      "contract_value": "string",
      "contract_unit_currency": "string",
      "tick_size": "string",
      "trading_status": "operational",
      "max_leverage_notional": "string",
      "default_leverage": "string",
      "initial_margin_scaling_factor": "string",
      "maintenance_margin_scaling_factor": "string",
      "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
      },
      "quoting_asset": {
        "id": 0,
        "symbol": "string",
        "precision": 0
      },
      "settling_asset": {
        "id": 0,
        "symbol": "string",
        "precision": 0
      }
    }
  }
]

Properties

Name Type Required Restrictions Description
anonymous [Order] false none [An Order object]

BracketOrder

{
  "stop_loss_order": {
    "id": 0,
    "user_id": 0,
    "size": 0,
    "unfilled_size": 0,
    "side": "buy",
    "order_type": "limit_order",
    "limit_price": "string",
    "stop_order_type": "stop_loss_order",
    "stop_price": "string",
    "close_on_trigger": "false",
    "state": "open",
    "created_at": "string",
    "product": {
      "id": 0,
      "symbol": "string",
      "description": "string",
      "created_at": "string",
      "updated_at": "string",
      "settlement_time": "string",
      "product_type": "future",
      "pricing_source": "string",
      "impact_size": 0,
      "initial_margin": 0,
      "maintenance_margin": "string",
      "contract_value": "string",
      "contract_unit_currency": "string",
      "tick_size": "string",
      "trading_status": "operational",
      "max_leverage_notional": "string",
      "default_leverage": "string",
      "initial_margin_scaling_factor": "string",
      "maintenance_margin_scaling_factor": "string",
      "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
      },
      "quoting_asset": {
        "id": 0,
        "symbol": "string",
        "precision": 0
      },
      "settling_asset": {
        "id": 0,
        "symbol": "string",
        "precision": 0
      }
    }
  },
  "take_profit_order": {
    "id": 0,
    "user_id": 0,
    "size": 0,
    "unfilled_size": 0,
    "side": "buy",
    "order_type": "limit_order",
    "limit_price": "string",
    "stop_order_type": "stop_loss_order",
    "stop_price": "string",
    "close_on_trigger": "false",
    "state": "open",
    "created_at": "string",
    "product": {
      "id": 0,
      "symbol": "string",
      "description": "string",
      "created_at": "string",
      "updated_at": "string",
      "settlement_time": "string",
      "product_type": "future",
      "pricing_source": "string",
      "impact_size": 0,
      "initial_margin": 0,
      "maintenance_margin": "string",
      "contract_value": "string",
      "contract_unit_currency": "string",
      "tick_size": "string",
      "trading_status": "operational",
      "max_leverage_notional": "string",
      "default_leverage": "string",
      "initial_margin_scaling_factor": "string",
      "maintenance_margin_scaling_factor": "string",
      "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
      },
      "quoting_asset": {
        "id": 0,
        "symbol": "string",
        "precision": 0
      },
      "settling_asset": {
        "id": 0,
        "symbol": "string",
        "precision": 0
      }
    }
  }
}

DEPRECATED

Properties

Name Type Required Restrictions Description
stop_loss_order Order false none An Order object
take_profit_order Order false none An Order object

CreateOrderRequest

{
  "product_id": 0,
  "limit_price": "string",
  "size": 0,
  "side": "buy",
  "order_type": "limit_order",
  "time_in_force": "gtc",
  "post_only": "true",
  "reduce_only": "true",
  "bracket_order": {
    "stop_loss_price": "string",
    "take_profit_price": "string",
    "trail_amount": "string"
  }
}

A create order object

Properties

Name Type Required Restrictions Description
product_id integer false 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
time_in_force string false none none
post_only string false none none
reduce_only string false none none
bracket_order object false none DEPRECATED
» stop_loss_price string false none none
» take_profit_price string false none none
» trail_amount string false none none

Enumerated Values

Property Value
side buy
side sell
order_type limit_order
order_type market_order
time_in_force gtc
time_in_force ioc
time_in_force fok
post_only true
post_only false
reduce_only true
reduce_only false

CreateBracketOrderRequest

{
  "product_id": 0,
  "stop_loss_order": {
    "order_type": "market_order",
    "stop_price": "string"
  },
  "take_profit_order": {
    "order_type": "market_order",
    "stop_price": "string"
  }
}

DEPRECATED bracket order object

Properties

Name Type Required Restrictions Description
product_id integer false none none
stop_loss_order object false none none
» order_type string false none none
» stop_price string false none none
take_profit_order object false none none
» order_type string false none none
» stop_price string false none none

Enumerated Values

Property Value
order_type market_order
order_type market_order

ArrayOfCreateOrderRequest

[
  {
    "product_id": 0,
    "limit_price": "string",
    "size": 0,
    "side": "buy",
    "order_type": "limit_order",
    "time_in_force": "gtc",
    "post_only": "true",
    "reduce_only": "true",
    "bracket_order": {
      "stop_loss_price": "string",
      "take_profit_price": "string",
      "trail_amount": "string"
    }
  }
]

Properties

Name Type Required Restrictions Description
anonymous [CreateOrderRequest] false none [A create order object]

EditOrderRequest

{
  "id": 0,
  "product_id": 0,
  "limit_price": "string",
  "size": 0
}

edit order object

Properties

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

ArrayOfEditOrderRequest

[
  {
    "id": 0,
    "product_id": 0,
    "limit_price": "string",
    "size": 0
  }
]

Properties

Name Type Required Restrictions Description
anonymous [EditOrderRequest] false none [edit order object]

DeleteOrderRequest

{
  "id": 0,
  "product_id": 0
}

A delete order object

Properties

Name Type Required Restrictions Description
id integer false none none
product_id integer false none none

CancelAllFilterObject

{
  "product_id": 0,
  "cancel_limit_orders": "true",
  "cancel_stop_orders": "true"
}

Cancel all request filter object

Properties

Name Type Required Restrictions Description
product_id integer false none cancel all orders for particular product, cancels orders for all products if not provided
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

Enumerated Values

Property Value
cancel_limit_orders true
cancel_limit_orders false
cancel_stop_orders true
cancel_stop_orders false

ArrayOfDeleteOrderRequest

[
  {
    "id": 0,
    "product_id": 0
  }
]

Properties

Name Type Required Restrictions Description
anonymous [DeleteOrderRequest] false none [A delete order object]

Position

{
  "user_id": 0,
  "size": 0,
  "entry_price": "string",
  "margin": "string",
  "liquidation_price": "string",
  "bankruptcy_price": "string",
  "adl_level": 0,
  "product": {
    "id": 0,
    "symbol": "string",
    "description": "string",
    "created_at": "string",
    "updated_at": "string",
    "settlement_time": "string",
    "product_type": "future",
    "pricing_source": "string",
    "impact_size": 0,
    "initial_margin": 0,
    "maintenance_margin": "string",
    "contract_value": "string",
    "contract_unit_currency": "string",
    "tick_size": "string",
    "trading_status": "operational",
    "max_leverage_notional": "string",
    "default_leverage": "string",
    "initial_margin_scaling_factor": "string",
    "maintenance_margin_scaling_factor": "string",
    "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
    },
    "quoting_asset": {
      "id": 0,
      "symbol": "string",
      "precision": 0
    },
    "settling_asset": {
      "id": 0,
      "symbol": "string",
      "precision": 0
    }
  }
}

A position object

Properties

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 Product false none none

ArrayOfPositions

[
  {
    "user_id": 0,
    "size": 0,
    "entry_price": "string",
    "margin": "string",
    "liquidation_price": "string",
    "bankruptcy_price": "string",
    "adl_level": 0,
    "product": {
      "id": 0,
      "symbol": "string",
      "description": "string",
      "created_at": "string",
      "updated_at": "string",
      "settlement_time": "string",
      "product_type": "future",
      "pricing_source": "string",
      "impact_size": 0,
      "initial_margin": 0,
      "maintenance_margin": "string",
      "contract_value": "string",
      "contract_unit_currency": "string",
      "tick_size": "string",
      "trading_status": "operational",
      "max_leverage_notional": "string",
      "default_leverage": "string",
      "initial_margin_scaling_factor": "string",
      "maintenance_margin_scaling_factor": "string",
      "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
      },
      "quoting_asset": {
        "id": 0,
        "symbol": "string",
        "precision": 0
      },
      "settling_asset": {
        "id": 0,
        "symbol": "string",
        "precision": 0
      }
    }
  }
]

Properties

Name Type Required Restrictions Description
anonymous [Position] false none [A position object]

Fill

{
  "id": 0,
  "size": 0,
  "side": "buy",
  "price": "string",
  "role": "taker",
  "commission": "string",
  "created_at": "string",
  "product": {
    "id": 0,
    "symbol": "string",
    "description": "string",
    "created_at": "string",
    "updated_at": "string",
    "settlement_time": "string",
    "product_type": "future",
    "pricing_source": "string",
    "impact_size": 0,
    "initial_margin": 0,
    "maintenance_margin": "string",
    "contract_value": "string",
    "contract_unit_currency": "string",
    "tick_size": "string",
    "trading_status": "operational",
    "max_leverage_notional": "string",
    "default_leverage": "string",
    "initial_margin_scaling_factor": "string",
    "maintenance_margin_scaling_factor": "string",
    "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
    },
    "quoting_asset": {
      "id": 0,
      "symbol": "string",
      "precision": 0
    },
    "settling_asset": {
      "id": 0,
      "symbol": "string",
      "precision": 0
    }
  }
}

A fill object

Properties

Name Type Required Restrictions Description
id integer false none none
size integer false none none
side integer 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 Product false none none

Enumerated Values

Property Value
side buy
side sell
role taker
role maker

ArrayOfFills

[
  {
    "id": 0,
    "size": 0,
    "side": "buy",
    "price": "string",
    "role": "taker",
    "commission": "string",
    "created_at": "string",
    "product": {
      "id": 0,
      "symbol": "string",
      "description": "string",
      "created_at": "string",
      "updated_at": "string",
      "settlement_time": "string",
      "product_type": "future",
      "pricing_source": "string",
      "impact_size": 0,
      "initial_margin": 0,
      "maintenance_margin": "string",
      "contract_value": "string",
      "contract_unit_currency": "string",
      "tick_size": "string",
      "trading_status": "operational",
      "max_leverage_notional": "string",
      "default_leverage": "string",
      "initial_margin_scaling_factor": "string",
      "maintenance_margin_scaling_factor": "string",
      "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
      },
      "quoting_asset": {
        "id": 0,
        "symbol": "string",
        "precision": 0
      },
      "settling_asset": {
        "id": 0,
        "symbol": "string",
        "precision": 0
      }
    }
  }
]

Properties

Name Type Required Restrictions Description
anonymous [Fill] false none [A fill object]

OrderLeverage

{
  "leverage": "string",
  "order_margin": "string",
  "product_id": 0
}

Order Leverage for a product

Properties

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

L2Orderbook

{
  "buy_book": [
    {
      "price": "string",
      "size": 0
    }
  ],
  "sell_book": [
    {
      "price": "string",
      "size": 0
    }
  ],
  "recent_trades": [
    {
      "side": "buy",
      "size": 0,
      "price": "string",
      "timestamp": 0
    }
  ],
  "spot_price": "string",
  "mark_price": "string",
  "product_id": 0
}

L2 orderbook

Properties

Name Type Required Restrictions Description
buy_book [object] false none none
» price string false none none
» size integer false none none
sell_book [object] false none none
» price string false none none
» size integer false none none
recent_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
spot_price string false none none
mark_price string false none none
product_id integer false none none

Enumerated Values

Property Value
side buy
side sell

Wallet

{
  "balance": "string",
  "order_margin": "string",
  "position_margin": "string",
  "commission": "string",
  "available_balance": "string",
  "asset": {
    "id": 0,
    "symbol": "string",
    "precision": 0
  }
}

Properties

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
asset Asset false none none

ArrayOfWallets

[
  {
    "balance": "string",
    "order_margin": "string",
    "position_margin": "string",
    "commission": "string",
    "available_balance": "string",
    "asset": {
      "id": 0,
      "symbol": "string",
      "precision": 0
    }
  }
]

Properties

Name Type Required Restrictions Description
anonymous [Wallet] false none none

Transaction

{
  "id": 0,
  "amount": "string",
  "balance": "string",
  "transaction_type": "pnl",
  "meta_data": {},
  "product": {
    "id": 0,
    "symbol": "string",
    "description": "string",
    "created_at": "string",
    "updated_at": "string",
    "settlement_time": "string",
    "product_type": "future",
    "pricing_source": "string",
    "impact_size": 0,
    "initial_margin": 0,
    "maintenance_margin": "string",
    "contract_value": "string",
    "contract_unit_currency": "string",
    "tick_size": "string",
    "trading_status": "operational",
    "max_leverage_notional": "string",
    "default_leverage": "string",
    "initial_margin_scaling_factor": "string",
    "maintenance_margin_scaling_factor": "string",
    "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
    },
    "quoting_asset": {
      "id": 0,
      "symbol": "string",
      "precision": 0
    },
    "settling_asset": {
      "id": 0,
      "symbol": "string",
      "precision": 0
    }
  },
  "created_at": "string"
}

Properties

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 Product false none none
created_at string false none none

Enumerated Values

Property Value
transaction_type pnl
transaction_type deposit
transaction_type withdrawal
transaction_type commission
transaction_type conversion
transaction_type perpetual_futures_funding
transaction_type withdrawal_cancellation
transaction_type referral_bonus
transaction_type commission_rebate
transaction_type promo_credit

ArrayOfTransactions

[
  {
    "id": 0,
    "amount": "string",
    "balance": "string",
    "transaction_type": "pnl",
    "meta_data": {},
    "product": {
      "id": 0,
      "symbol": "string",
      "description": "string",
      "created_at": "string",
      "updated_at": "string",
      "settlement_time": "string",
      "product_type": "future",
      "pricing_source": "string",
      "impact_size": 0,
      "initial_margin": 0,
      "maintenance_margin": "string",
      "contract_value": "string",
      "contract_unit_currency": "string",
      "tick_size": "string",
      "trading_status": "operational",
      "max_leverage_notional": "string",
      "default_leverage": "string",
      "initial_margin_scaling_factor": "string",
      "maintenance_margin_scaling_factor": "string",
      "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
      },
      "quoting_asset": {
        "id": 0,
        "symbol": "string",
        "precision": 0
      },
      "settling_asset": {
        "id": 0,
        "symbol": "string",
        "precision": 0
      }
    },
    "created_at": "string"
  }
]

Properties

Name Type Required Restrictions Description
anonymous [Transaction] false none none

24hrTicker

{
  "symbol": "string",
  "timestamp": 0,
  "open": 0,
  "high": 0,
  "low": 0,
  "close": 0,
  "volume": 0
}

Properties

Name Type Required Restrictions Description
symbol string false none none
timestamp integer false none none
open number false none none
high number false none none
low number false none none
close number false none none
volume integer false none none

OHLCData

{
  "t": [
    0
  ],
  "o": [
    "string"
  ],
  "h": [
    "string"
  ],
  "l": [
    "string"
  ],
  "c": [
    "string"
  ],
  "v": [
    0
  ]
}

Properties

Name Type Required Restrictions Description
t [integer] false none array of timestamps for which candles are returned
o [string] false none open prices for candles
h [string] false none high prices for candles
l [string] false none low prices for candles
c [string] false none close prices for candles
v [integer] false none volumes for candles

WithdrawalsResponse

{
  "address": "string",
  "amount": "string",
  "fee": "string",
  "id": 0,
  "state": "string",
  "transaction_meta": "string",
  "user_id": 0
}

Properties

Name Type Required Restrictions Description
address string false none BTC Destination Address
amount string false none Amount to be Withdrawn
fee string false none Withdrawal Fee
id integer(int64) false none Trasaction id
state string false none state of withdrawal request
transaction_meta string false none Amount to be Withdrawn
user_id integer(int64) false none User id

EditBatchOrders

{
  "product_id": 0,
  "orders": [
    {
      "id": 0,
      "size": 0,
      "limit_price": "string",
      "product_id": 0
    }
  ]
}

Properties

Name Type Required Restrictions Description
product_id integer(int32) true none none
orders [BatchEditOrders] true none none

BatchEditOrders

{
  "id": 0,
  "size": 0,
  "limit_price": "string",
  "product_id": 0
}

Properties

Name Type Required Restrictions Description
id integer(int32) true none Order id to be edited
size integer(int32) true none none
limit_price string true none none
product_id integer(int32) true none none