Overview
Welcome to the FTX US API documentation. We offer complete REST, Websocket, and FIX APIs to suit your algorithmic trading needs.
REST API
HTTP-based API with full trading and asset management functionality, with public orderbook and trades data as well as private account data and order management.
REST endpoint URL: https://ftx.us/api
Requests and responses use JSON.
Authentication
import time
import hmac
from requests import Request
ts = int(time.time() * 1000)
request = Request('GET', '<api_endpoint>')
prepared = request.prepare()
signature_payload = f'{ts}{prepared.method}{prepared.path_url}'.encode()
signature = hmac.new('YOUR_API_SECRET'.encode(), signature_payload, 'sha256').hexdigest()
prepared.headers[f'FTXUS-KEY'] = 'YOUR_API_KEY'
prepared.headers[f'FTXUS-SIGN'] = signature
prepared.headers[f'FTXUS-TS'] = str(ts)
# Only include line if you want to access a subaccount. Remember to URI-encode the subaccount name if it contains special characters!
# prepared.headers[f'FTXUS-SUBACCOUNT'] = 'my_subaccount_nickname'
var method = HttpMethod.Get
var endpoint = $"/api/account";
var request = new HttpRequestMessage(method, endpoint);
var _nonce = (DateTime.UtcNow - start).TotalMilliseconds;
var hashMaker = new HMACSHA256(Encoding.UTF8.GetBytes(""YOUR_API_SECRET""));
var signaturePayload = $"{_nonce}{method.ToString().ToUpper()}{endpoint}";
var hash = hashMaker.ComputeHash(Encoding.UTF8.GetBytes(signaturePayload));
var hashString = BitConverter.ToString(hash).Replace("-", string.Empty);
var signature = hashString.ToLower();
request.Headers.Add("FTXUS-KEY", "YOUR_API_KEY");
request.Headers.Add("FTXUS-SIGN", signature);
request.Headers.Add("FTXUS-TS", _nonce.ToString());
For authenticated requests, the following headers should be sent with the request:
FTXUS-KEY
: Your API keyFTXUS-TS
: Number of milliseconds since Unix epochFTXUS-SIGN
: SHA256 HMAC of the following four strings, using your API secret, as a hex string:- Request timestamp (e.g.
1528394229375
) - HTTP method in uppercase (e.g.
GET
orPOST
) - Request path, including leading slash and any URL parameters but not including the hostname (e.g.
/account
) - (POST only) Request body (JSON-encoded)
- Request timestamp (e.g.
FTXUS-SUBACCOUNT
(optional): URI-encoded name of the subaccount to use. Omit if not using subaccounts.
Rate limits
Hitting our rate limits will result in HTTP 429 errors. Non-order placement requests do not count towards rate limits. Rate limits are tiered by account trading volumes. For details, please see this post here. Note that limits in the linked post are at the account level
Pagination
Generalized Request
GET {endpoint}?start_time=1559881511&end_time=1559881711
FTX supports pagination on most REST API endpoints. Pagination allows you to specify the time range of data to be returned, which also enables you to retrieve more results than are returned by default. You can find sample Python code which demonstrates pagination using the start_time and end_time parameters here
Name | Type | Value | Description |
---|---|---|---|
start_time | number | 1559881511 | optional; filter starting time in seconds |
end_time | number | 1559881711 | optional; filter ending time in seconds |
Subaccounts
To specify a subaccount, include its URI-encoded nickname in the header FTXUS-SUBACCOUNT
with the request.
Get all subaccounts
Request
GET /subaccounts
Response
{
"success": true,
"result": [
{
"nickname": "sub1",
"deletable": true,
"editable": true,
}
]
}
Requires authentication.
Response format
Name | Type | Value | Description |
---|---|---|---|
nickname | string | sub1 | subaccount name |
deletable | boolean | true | whether the subaccount can be deleted |
editable | boolean | true | whether the nickname of the subaccount can be changed |
Create subaccount
Request
POST /subaccounts
{
"nickname": "sub2",
}
Response
{
"success": true,
"result": {
"nickname": "sub2",
"deletable": true,
"editable": true,
}
}
Requires authentication.
Payload format
Name | Type | Value | Description |
---|---|---|---|
nickname | string | sub2 |
Response format
Name | Type | Value | Description |
---|---|---|---|
nickname | string | sub2 | subaccount name |
deletable | boolean | true | whether the subaccount can be deleted |
editable | boolean | true | whether the nickname of the subaccount can be changed |
Change subaccount name
Request
POST /subaccounts/update_name
{
"nickname": "sub2",
"newNickname": "newSub2"
}
Response
{
"success": true,
"result": null
}
Requires authentication.
Payload format
Name | Type | Value | Description |
---|---|---|---|
nickname | string | sub2 | current nickname of subaccount |
newNickname | string | newSub2 | new nickname of subaccount |
Delete subaccount
Request
DELETE /subaccounts
{
"nickname": "sub2",
}
Response
{
"success": true,
"result": null
}
Requires authentication.
Payload format
Name | Type | Value | Description |
---|---|---|---|
nickname | string | sub2 |
Get subaccount balances
Request
GET /subaccounts/{nickname}/balances
Response
{
"success": true,
"result": [
{
"coin": "USDT",
"free": 4321.2,
"total": 4340.2
}
]
}
Requires authentication.
Response format
Name | Type | Value | Description |
---|---|---|---|
coin | string | USDT | coin id |
free | number | 4321.2 | free amount |
total | number | 4340.2 | total amount |
Transfer between subaccounts
Request
POST /subaccounts/transfer
{
"coin": "XRP",
"size": 10000,
"source": null,
"destination": "sub1",
}
Response
{
"success": true,
"result": {
"id": 316450,
"coin": "XRP",
"size": 10000,
"time": "2019-03-05T09:56:55.728933+00:00",
"notes": "",
"status": "complete",
}
}
Requires authentication.
Payload format
Name | Type | Value | Description |
---|---|---|---|
coin | string | XRP | |
size | number | 31431.0 | |
source | string | main | name of the source subaccount. Use null or 'main' for the main account |
destination | string | sub1 | name of the destination subaccount. Use null or 'main' for the main account |
Response format
Name | Type | Value | Description |
---|---|---|---|
id | number | 316450 | |
coin | string | XRP | |
size | number | 10000 | |
time | string | 2019-03-05T09:56:55.728933+00:00 | |
notes | string | ||
status | string | complete | always 'complete' |
Markets
Get markets
Request
GET /markets
Response
{
"success": true,
"result": [
{
"name": "BTC/USD",
"baseCurrency": "BTC",
"quoteCurrency": "USD",
"type": "spot",
"enabled": true,
"ask": 3949.25,
"bid": 3949,
"last": 10579.52,
"priceIncrement": 0.25,
"sizeIncrement": 0.001,
"largeOrderThreshold": 5000.0
}
]
}
Response format
Name | Type | Value | Description |
---|---|---|---|
type | string | spot | |
name | string | BTC/USD | |
baseCurrency | string | BTC | |
quoteCurrency | string | USD | |
enabled | boolean | true | |
ask | number | 3949.25 | best ask |
bid | number | 3949.00 | best bid |
last | number | 3949.00 | last traded price |
priceIncrement | number | 0.25 | |
sizeIncrement | number | 0.001 | |
largeOrderThreshold | number | 5000.0 | threshold above which an order is considered large (for VIP rate limits) |
Get single market
Request
GET /markets/{market_name}
Response
See /markets
Get orderbook
Request
GET /markets/{market_name}/orderbook?depth={depth}
Response
{
"success": true,
"result": {
"asks": [
[
4114.25,
6.263
]
],
"bids": [
[
4112.25,
49.29
]
]
}
}
Parameters
Name | Type | Value | Description |
---|---|---|---|
market_name | string | BTC/USD | Required. Name of the market. |
depth | number | 35 | max 100, default 20 |
Response format
Name | Type | Value | Description |
---|---|---|---|
asks | array | [4114.25, 6.263] | Array with price and size |
bids | array | [4112, 49.29] | Array with price and size |
Get trades
Supports pagination
Request
GET /markets/{market_name}/trades?start_time={start_time}&end_time={end_time}
Response
{
"success": true,
"result": [
{
"id": 3855995,
"price": 3857.75,
"side": "buy",
"size": 0.111,
"time": "2019-03-20T18:16:23.397991+00:00"
}
]
}
Parameters
Name | Type | Value | Description |
---|---|---|---|
market_name | string | BTC/USD | name of the market |
start_time | number | 1559881511 | optional |
end_time | number | 1559881711 | optional |
Response format
Name | Type | Value | Description |
---|---|---|---|
id | number | 3855995 | trade id |
price | number | 3857.75 | |
side | string | buy | |
size | number | 0.111 | |
time | string | 2019-03-20T18:16:23.397991+00:00 |
Get historical prices
Request
GET /markets/{market_name}/candles?resolution={resolution}&start_time={start_time}&end_time={end_time}
Response
{
"success": true,
"result": [
{
"close":11055.25,
"high":11089.0,
"low":11043.5,
"open":11059.25,
"startTime":"2019-06-24T17:15:00+00:00",
"volume":464193.95725
}
]
}
Parameters
Name | Type | Value | Description |
---|---|---|---|
market_name | string | BTC/USD | name of the market |
resolution | number | 300 | window length in seconds. options: 15, 60, 300, 900, 3600, 14400, 86400, or any multiple of 86400 up to 30*86400 |
start_time | number | 1559881511 | optional |
end_time | number | 1559881711 | optional |
Response format
Name | Type | Value | Description |
---|---|---|---|
startTime | string | 2019-06-24T17:15:00+00:00 | start time of the window |
open | number | 11059.25 | mark price at startTime |
close | number | 11055.25 | mark price at the end of the window: startTime + resolution |
high | number | 11089.0 | highest mark price over the window |
low | number | 11059.25 | lowest mark price over the window |
volume | number | 464193.95725 | volume traded in the window |
Wallet
Get coins
Request
GET /wallet/coins
Response
{
"success": true,
"result": [
{
"bep2Asset": null,
"canConvert": true,
"canDeposit": true,
"canWithdraw": true,
"collateral": true,
"collateralWeight": 0.975,
"creditTo": null,
"erc20Contract": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"fiat": false,
"hasTag": false,
"id": "USDT",
"isToken": false,
"methods": ["omni", "erc20", "trx"],
"spotMargin": false,
"name": "USD Tether",
"trc20Contract": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
"usdFungible": false
}
]
}
Response format
Name | Type | Value | Description |
---|---|---|---|
canDeposit | boolean | true | true if this coin can be deposited via a crypto transaction |
canWithdraw | boolean | true | true if this coin can be withdrawn via a crypto transaction |
hasTag | boolean | false | true if addresses for this coin have a tag |
id | string | USDT | |
name | string | USD Tether | |
bep2Asset | string | null | |
canConvert | boolean | true | |
collateral | boolean | true | |
collateralWeight | number | 0.975 | |
creditTo | string | null | |
erc20Contract | string | 0xdAC17F958D2ee523a2206206994597C13D831ec7 | |
fiat | boolean | false | |
isToken | boolean | false | |
methods | array | ["omni", "erc20", "trx"] | |
spotMargin | boolean | false | |
trc20Contract | string | TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t | |
usdFungible | boolean | false |
Get balances
Request
GET /wallet/balances
Response
{
"success": true,
"result": [
{
"coin": "USDT",
"free": 2320.2,
"spotBorrow": 0,
"total": 2340.2,
"usdValue": 2340.2,
"availableWithoutBorrow": 2320.2
}
]
}
Requires authentication.
Response format
Name | Type | Value | Description |
---|---|---|---|
coin | string | USDT | coin id |
free | number | 2320.2 | free amount |
spotBorrow | number | 0 | amount borrowed using spot margin |
total | number | 2340.2 | total amount |
usdValue | number | 2340.2 | approximate total amount in USD |
availableWithoutBorrow | number | 2320.2 | amount available without borrowing |
Get balances of all accounts
Request
GET /wallet/all_balances
Response
{
"success": true,
"result": {
"main": [
{
"coin": "USDT",
"free": 2320.2,
"spotBorrow": 0.0,
"total": 2340.2,
"usdValue": 2340.2,
"availableWithoutBorrow": 2320.2
},
{
"coin": "BTC",
"free": 2.0,
"spotBorrow": 0.0,
"total": 3.2,
"usdValue": 23456.7,
"availableWithoutBorrow": 2.0
}
],
"Battle Royale": [
{
"coin": "USD",
"free": 2000.0,
"spotBorrow": 0.0,
"total": 2200.0,
"usdValue": 2200.0,
"availableWithoutBorrow": 2000.0
}
]
}
}
Requires authentication.
The response will contain an object whose keys are the subaccount names. The main account will appear under the key main
.
Response format
Name | Type | Value | Description |
---|---|---|---|
coin | string | USDT | coin id |
free | number | 2320.2 | free amount |
spotBorrow | number | 0 | amount borrowed using spot margin |
total | number | 2340.2 | total amount |
usdValue | number | 2340.2 | approximate total amount in USD |
availableWithoutBorrow | number | 2320.2 | amount available without borrowing |
Get deposit address
Request
GET /wallet/deposit_address/{coin}?method={method}
Response
{
"success": true,
"result": {
"address": "0x83a127952d266A6eA306c40Ac62A4a70668FE3BE",
"tag": "null"
}
}
Requires authentication.
Request parameters
Name | Type | Value | Description |
---|---|---|---|
coin | string | USDT | |
method | string | erc20 | optional; for coins available on different blockchains (e.g USDT) |
- For
ERC20
tokens:method=erc20
- For
TRC20
tokens:method=trx
- For
Omni
tokens:method=omni
- For
BEP2
tokens:method=bep2
- For
Binance Smart Chain
tokens:method=bsc
- For
Matic
tokens:method=matic
Response format
Name | Type | Value | Description |
---|---|---|---|
address | string | 0x83a127952d266A6eA306c40Ac62A4a70668FE3BE |
|
tag | string | null |
optional |
Get deposit address list
Request
POST /wallet/deposit_address/list
[
{
"coin": "USDT",
"method": "erc20"
},
{
"coin": "ETH",
}
]
Response
{
"success": true,
"result": [{
"coin": "USDT"
"address": "0x83a127952d266A6eA306c40Ac62A4a70668FE3BE",
"tag": "null"
}]
}
Requires authentication.
Request parameters
Name | Type | Value | Description |
---|---|---|---|
coin | string | USDT | |
method | string | erc20 | optional; for coins available on different blockchains (e.g USDT) |
- For
ERC20
tokens:method=erc20
- For
TRC20
tokens:method=trx
- For
Omni
tokens:method=omni
- For
BEP2
tokens:method=bep2
- For
Binance Smart Chain
tokens:method=bsc
- For
Matic
tokens:method=matic
Response format
Name | Type | Value | Description |
---|---|---|---|
coin | string | USDT | |
address | string | 0x83a127952d266A6eA306c40Ac62A4a70668FE3BE |
|
tag | string | null |
optional |
Get deposit history
Request
GET /wallet/deposits
Response
{
"success": true,
"result": {
"coin": "TUSD",
"confirmations": 64,
"confirmedTime": "2019-03-05T09:56:55.728933+00:00",
"fee": 0,
"id": 1,
"sentTime": "2019-03-05T09:56:55.735929+00:00",
"size": "99.0",
"status": "confirmed",
"time": "2019-03-05T09:56:55.728933+00:00",
"method": "erc20",
"txid": "0x8078356ae4b06a036d64747546c274af19581f1c78c510b60505798a7ffcaf1"
}
}
Requires authentication.
Request parameters
Name | Type | Value | Description |
---|---|---|---|
start_time | number | 1564146934 | optional; minimum time of items to return, in Unix time (seconds since 1970-01-01) |
end_time | number | 1564233334 | optional; maximum time of items to return, in Unix time (seconds since 1970-01-01) |
Response format
Name | Type | Value | Description |
---|---|---|---|
coin | string | TUSD | coin id |
confirmations | number | 64 | number of blockchain confirmations |
confirmedTime | string | 2019-03-05T09:56:55.728933+00:00 | |
fee | number | 0.0 | fee, not included in size |
id | number | 1 | deposit id |
sentTime | string | 2019-03-05T09:56:55.735929+00:00 | |
size | string | 99.0 | |
status | string | confirmed | one of "confirmed", "unconfirmed", or "cancelled" |
time | string | 2019-03-05T09:56:55.728933+00:00 | |
method string | erc20 | protocol used for the blockchain transfer | |
txid | string | 0x8078356ae4b06a036d64747546c274af19581f1c78c510b60505798a7ffcaf1 |
optional |
notes | string | Transfer from main account to my_subaccount | optional |
Get withdrawal history
Request
GET /wallet/withdrawals
Response
{
"success": true,
"result": {
"coin": "TUSD",
"address": "0x83a127952d266A6eA306c40Ac62A4a70668FE3BE",
"tag": "null",
"fee": 0,
"id": 1,
"size": "99.0",
"status": "complete",
"time": "2019-03-05T09:56:55.728933+00:00",
"txid": "0x8078356ae4b06a036d64747546c274af19581f1c78c510b60505798a7ffcaf1"
}
}
Requires authentication.
Request parameters
Name | Type | Value | Description |
---|---|---|---|
start_time | number | 1564146934 | optional; minimum time of items to return, in Unix time (seconds since 1970-01-01) |
end_time | number | 1564233334 | optional; maximum time of items to return, in Unix time (seconds since 1970-01-01) |
Response format
Name | Type | Value | Description |
---|---|---|---|
coin | string | TUSD | coin id |
address | string | 0x83a127952d266A6eA306c40Ac62A4a70668FE3BE |
deposit address the withdrawal was sent to |
tag | string | null | |
fee | number | 0.0 | fee, not included in size |
id | number | 1 | withdrawal id |
size | string | 99.0 | |
status | string | complete | one of "requested", "processing", "sent", "complete", or "cancelled" |
time | string | 2019-03-05T09:56:55.728933+00:00 | |
txid | string | 0x8078356ae4b06a036d64747546c274af19581f1c78c510b60505798a7ffcaf1 |
optional |
notes | string | Transfer from main account to my_subaccount | optional |
Request withdrawal
Request
POST /wallet/withdrawals
{
"coin": "USDT",
"size": 20.2,
"address": "0x83a127952d266A6eA306c40Ac62A4a70668FE3BE",
"tag": null,
"password": "my_withdrawal_password",
"code": 152823
}
Response
{
"success": true,
"result": {
"coin": "USDT",
"address": "0x83a127952d266A6eA306c40Ac62A4a70668FE3BE",
"tag": "null",
"fee": 0,
"id": 1,
"size": "20.2",
"status": "requested",
"time": "2019-03-05T09:56:55.728933+00:00",
"txid": "null"
}
}
Requires authentication.
Payload format
Name | Type | Value | Description |
---|---|---|---|
coin | string | USDT | coin to withdraw |
size | number | 20.2 | amount to withdraw |
address | string | 0x83a127952d266A6eA306c40Ac62A4a70668FE3BE |
address to send to |
tag | string | null | optional |
password | string | null | optional; withdrawal password if it is required for your account |
code | string | null | optional; 2fa code if it is required for your account |
Response format
Name | Type | Value | Description |
---|---|---|---|
coin | string | USDT | coin id |
address | string | 0x83a127952d266A6eA306c40Ac62A4a70668FE3BE |
deposit address the withdrawal was sent to |
tag | string | null | |
fee | number | 0.0 | fee, not included in size |
id | number | 1 | withdrawal id |
size | string | 20.2 | |
status | string | requested | one of "requested", "processing", "complete", or "cancelled" |
time | string | 2019-03-05T09:56:55.728933+00:00 | |
txid | string | null |
Get withdrawal fees
Request
GET /wallet/withdrawal_fee
{
"coin": "USDC",
"size": 20.2,
"address": "0x83a127952d266A6eA306c40Ac62A4a70668FE3BE",
"tag": null
}
Response
{
"success": true,
"result": {
"method": "erc20",
"address": "0x83a127952d266A6eA306c40Ac62A4a70668FE3BE",
"fee": 0,
"congested": false
}
}
Requires authentication.
Payload format
Name | Type | Value | Description |
---|---|---|---|
coin | string | COIN | coin to withdraw |
size | number | 20.2 | amount to withdraw |
address | string | 0x83a127952d266A6eA306c40Ac62A4a70668FE3BE |
address to send to |
tag | string | null | optional |
method | string | erc20 | optional; for coins available on different blockchains (e.g USDT) |
- For
ERC20
tokens:method=erc20
- For
TRC20
tokens:method=trx
- For
Omni
tokens:method=omni
- For
BEP2
tokens:method=bep2
- For
Binance Smart Chain
tokens:method=bsc
- For
Matic
tokens:method=matic
Response format
Name | Type | Value | Description |
---|---|---|---|
method | string | blockchain protocol that will be used | |
fee | number | 0 | fee that will be charged on the withdrawal (size - fee will be sent to the destination) |
congested | boolean | false | if this blockchain is currently congested |
Get saved addresses
This endpoint provides you with your saved addresses
Request
GET /wallet/saved_addresses
Response
{
"success": true,
"result": [
{
"address": "0xb2EA1CC386A260c9Ae3ebda2cb7AEd212b034Ab4",
"coin": "ETH",
"fiat": false,
"id": 31189,
"isPrimetrust": false,
"lastUsedAt": "2020-09-21T15:38:11.795763+00:00",
"name": "MetaMask 1",
"tag": null,
"whitelisted": true,
"whitelistedAfter": "2020-08-26T09:41:53.959256+00:00"
},
{
"address": "0xE4Ba8791E0fdbdc50024898A384FecFD90e69553",
"coin": "ETH",
"fiat": false,
"id": 46725,
"isPrimetrust": false,
"lastUsedAt": "2020-09-21T09:16:46.918175+00:00",
"name": "Ledger Nano S",
"tag": null,
"whitelisted": true,
"whitelistedAfter": "2020-09-21T09:16:16.829467+00:00"
}
]
}
Requires authentication.
Request parameters
Name | Type | Value | Description |
---|---|---|---|
coin | string | ETH | optional, filters saved addresses by coin; |
Response format
Name | Type | Value | Description |
---|---|---|---|
address | string | "0xb2EA1CC386A260c9Ae3ebda2cb7AEd212b034Ab4" | |
coin | string | ETH | coin id |
fiat | boolean | false | |
id | int | 31189 | |
isPrimetrust | boolean | false | |
lastUsedAt | string | "2020-09-21T15:38:11.795763+00:00" | |
tag | string | null | |
whitelisted | boolean | true | true if the address is whitelisted, null if the address has never been whitelisted or has been unwhitelisted |
whitelistedAfter | string | "2020-09-21T09:16:16.829467+00:00" | Date after which the address has been whitelisted, null if the address has never been whitelisted or has been unwhitelisted |
Create saved addresses
Request
POST /wallet/saved_addresses
{
"coin": "USDC",
"address": "0x83a127952d266A6eA306c40Ac62A4a70668FE3BE",
"wallet": "sol",
"addressName": "MetaMask",
"code": 123456
}
Response
{
"success": true,
"result": {
"address": "0x83a127952d266A6eA306c40Ac62A4a70668FE3BE",
"coin": "USDC",
"fiat": false,
"id": 52382,
"isPrimetrust": false,
"isSwipeCard": false,
"lastUsedAt": "2020-10-08T06:11:03.072427+00:00",
"name": "MetaMask",
"tag": null,
"wallet": "sol",
"whitelisted": null,
"whitelistedAfter": null
}
}
Requires authentication.
Request parameters
Name | Type | Value | Description |
---|---|---|---|
coin | string | USDC | coin id |
address | string | 0xb2EA1CC386A260c9Ae3ebda2cb7AEd212b034Ab4 | |
wallet | string | sol | chain; must be supplied for multi-chain coins |
addressName | string | MetaMask | |
isPrimetrust | boolean | false | |
tag | string | null | optional, tag for the address |
whitelist | boolean | false | Pass true if the user has whitelisting enabled and would like this new address to be whitelisted |
code | number | 123456 | optional; 2fa code if it is required for your account |
- For
ERC20
tokens:wallet=erc20
- For
TRC20
tokens:wallet=trx
- For
SPL
tokens:wallet=sol
- For
Omni
tokens:wallet=omni
- For
BEP2
tokens:wallet=bep2
- For
Binance Smart Chain
tokens:wallet=bsc
- For
Fantom
tokens:wallet=ftm
- For
Avax
tokens:wallet=avax
- For
Matic
tokens:wallet=matic
Response format
Name | Type | Value | Description |
---|---|---|---|
address | string | 0xb2EA1CC386A260c9Ae3ebda2cb7AEd212b034Ab4 | |
coin | string | USDC | coin id |
fiat | boolean | false | |
id | int | 52382 | |
isPrimetrust | boolean | false | |
isSwipeCard | boolean | false | |
lastUsedAt | string | 2020-10-08T06:11:03.072427+00:00 | |
name | string | MetaMask | |
tag | string | null | |
wallet | string | sol | chain; must be supplied for multi-chain coins |
whitelisted | boolean | null | true if the address is whitelisted, null if the address has never been whitelisted or has been unwhitelisted |
whitelistedAfter | boolean | null | Date after which the address has been whitelisted, null if the address has never been whitelisted or has been unwhitelisted |
Delete saved addresses
Request
DELETE /wallet/saved_addresses/{saved_address_id}
Response
{
"success": true,
"result": "Address deleted"
}
Requires authentication.
Request parameters
Name | Type | Value | Description |
---|---|---|---|
saved_address_id | int | 52382 |
Register a SEN deposit
Request
POST /sen/deposits/{sen_link_id}
{
"size": 175.0
}
Response
"Success"
Requires authentication.
Register a SEN deposit within our system. In order to be auto-credited, you must register the deposit with us beforehand.
Name | Type | Value | Description |
---|---|---|---|
sen_link_id | int | 142 | Unique ID of the SEN link |
size | number | 175.0 | Amount of the deposit |
Request a SEN withdrawal
Request
POST /sen/withdrawals/{sen_link_id}
{
"size": 175.0
}
Response
"Success"
Requires authentication.
Request a Signet withdrawal.
Name | Type | Value | Description |
---|---|---|---|
signet_link_id | int | 142 | Unique ID of the SEN link |
size | number | 175.0 | Amount of the withdrawal |
Register a Signet deposit
Request
POST /signet/deposits/{signet_link_id}
{
"size": 175.0
}
Response
"Success"
Requires authentication.
Request a Signet withdrawal.
Name | Type | Value | Description |
---|---|---|---|
signet_link_id | int | 142 | Unique ID of the Signet link |
size | number | 175.0 | Amount of the deposit |
Request a Signet withdrawal
Request
POST /signet/withdrawals/{signet_link_id}
{
"size": 175.0
}
Response
"Success"
Requires authentication.
Request a Signet withdrawal.
Name | Type | Value | Description |
---|---|---|---|
signet_link_id | int | 142 | Unique ID of the Signet link |
size | number | 175.0 | Amount of the withdrawal |
Orders
Get open orders
Request
GET /orders?market={market}
Response
{
"success": true,
"result": [
{
"createdAt": "2019-03-05T09:56:55.728933+00:00",
"filledSize": 10,
"id": 9596912,
"market": "BTC/USD",
"price": 0.306525,
"avgFillPrice": 0.306526,
"remainingSize": 31421,
"side": "sell",
"size": 31431,
"status": "open",
"type": "limit",
"reduceOnly": false,
"ioc": false,
"postOnly": false,
"clientId": null
}
]
}
Requires authentication.
Request parameters
Name | Type | Value | Description |
---|---|---|---|
market | string | BTC/USD | optional; market to limit orders |
Response format
Name | Type | Value | Description |
---|---|---|---|
id | number | 9596912 | |
market | string | BTC/USD | |
type | string | limit | |
side | string | sell | |
price | number | 0.306525 | |
size | number | 31431.0 | |
filledSize | number | 10.0 | |
remainingSize | number | 31421.0 | |
avgFillPrice | number | 0.306526 | |
status | string | new (accepted but not processed yet), open , or closed (filled or cancelled) |
|
createdAt | string | 2019-03-05T09:56:55.728933+00:00 | |
reduceOnly | boolean | false | |
ioc | boolean | false | |
postOnly | boolean | false | |
clientId | string | optional; client order id |
Get order history
Request
GET /orders/history?market={market}
Response
{
"success": true,
"result": [
{
"avgFillPrice": 10135.25,
"clientId": null,
"createdAt": "2019-06-27T15:24:03.101197+00:00",
"filledSize": 0.001,
"id": 257132591,
"ioc": false,
"market": "BTC/USD",
"postOnly": false,
"price": 10135.25,
"reduceOnly": false,
"remainingSize": 0.0,
"side": "buy",
"size": 0.001,
"status": "closed",
"type": "limit"
},
],
"hasMoreData": false,
}
Requires authentication.
Request parameters
Name | Type | Value | Description |
---|---|---|---|
market | string | BTC/USD | optional; market to limit orders |
side | string | buy | optional; buy or sell side |
orderType | string | limit | optional; filter by market or limit orders |
start_time | number | 1559881511 | optional; only fetch orders created after this time |
end_time | number | 1559901511 | optional; only fetch orders created before this time |
Response format
Name | Type | Value | Description |
---|---|---|---|
id | number | 257132591 | |
market | string | BTC/USD | |
type | string | limit | |
side | string | buy | |
price | number | 10135.25 | |
size | number | 0.001 | |
filledSize | number | 0.001 | |
remainingSize | number | 0.0 | |
avgFillPrice | number | 10135.25 | |
status | string | new (accepted but not processed yet), open , or closed (filled or cancelled) |
|
createdAt | string | 2019-06-27T15:24:03.101197+00:00 | |
reduceOnly | boolean | false | |
ioc | boolean | false | |
postOnly | boolean | false | |
clientId | string | optional; client order id |
Get open trigger orders
Request
GET /conditional_orders?market={market}
Response
{
"success": true,
"result": [
{
"createdAt": "2019-03-05T09:56:55.728933+00:00",
"id": 50001,
"market": "BTC/USD",
"orderPrice": null,
"reduceOnly": false,
"side": "buy",
"size": 0.003,
"status": "open",
"trailStart": null,
"trailValue": null,
"triggerPrice": 0.49,
"triggeredAt": null,
"type": "stop"
"orderType": "market",
"filledSize": 0,
"avgFillPrice": null,
"retryUntilFilled": false
]
}
Requires authentication.
Request parameters
Name | Type | Value | Description |
---|---|---|---|
market | string | BTC/USD | optional; market to limit orders |
type | string | stop | optional; type of trigger order (stop , trailing_stop , or take_profit ) |
Response format
Name | Type | Value | Description |
---|---|---|---|
createdAt | string | 2019-03-05T09:56:55.728933+00:00 | |
id | number | 50001 | |
market | string | BTC/USD | |
orderPrice | number | 0.50 | Limit price for stop limit and take profit limit orders; otherwise null |
reduceOnly | boolean | false | |
side | string | buy | |
size | number | 31431.0 | |
status | string | open | Always open for this endpoint |
trailStart | number | null | trigger price - trail value; only for trailing stop orders |
trailValue | number | null | only for trailing stop orders |
triggerPrice | number | 0.49 | market price at which this order will trigger |
triggeredAt | string | null | time of first trigger. null if never triggered |
type | string | stop | Values are stop , trailing_stop , and take_profit |
orderType | string | market | Values are market , limit |
filledSize | number | 0 | |
avgFillPrice | number | null | |
retryUntilFilled | boolean | false | Whether or not to keep re-triggering until filled |
Get trigger order triggers
Request
GET /conditional_orders/<conditional_order_id>/triggers
Response
{
"success": true,
"result": [
{
"error": null,
"filledSize": 4.0,
"orderSize": 10.0,
"orderId": 38066650,
"time": "2020-01-19T09:23:36.570904+00:00"
}
]
}
Requires authentication.
Response format
Name | Type | Value | Description |
---|---|---|---|
time | string | 2019-03-05T09:56:55.728933+00:00 | |
orderSize | number | 31431.0 | null if order failed to place |
filledSize | number | 0 | null if order failed to place |
orderId | number | null if order failed to place | |
error | string | null | reason for order failing to be placed, null if successful |
Get trigger order history
Request
GET /conditional_orders/history?market={market}
Response
{
"success": true,
"result": [
{
"createdAt": "2019-03-05T09:56:55.728933+00:00",
"id": 50000,
"market": "BTC/USD",
"orderPrice": null,
"reduceOnly": false,
"side": "buy",
"size": 31431,
"status": "triggered",
"trailStart": null,
"trailValue": null,
"triggerPrice": 0.37,
"triggeredAt": 2019-03-06T03:26:53.268723+00:00,
"type": "stop",
"orderType": "market",
"filledSize": 31431,
"avgFillPrice": 0.3701,
"orderType": "market",
"filledSize": 0,
"avgFillPrice": null,
"retryUntilFilled": false,
},
],
"hasMoreData": false,
}
Requires authentication.
Request parameters
Name | Type | Value | Description |
---|---|---|---|
market | string | BTC/USD | optional; market to limit orders |
start_time | number | 1559881511 | optional; only fetch orders created after this time |
end_time | number | 1559881511 | optional; only fetch orders created before this time |
side | string | buy | optional; valid values are buy and sell . |
type | string | trailing_stop | optional; valid values are stop , trailing_stop , and take_profit . |
orderType | string | limit | optional; valid values are market and limit . |
Response format
Name | Type | Value | Description |
---|---|---|---|
createdAt | string | 2019-03-05T09:56:55.728933+00:00 | |
id | number | 50001 | |
market | string | BTC/USD | |
orderPrice | number | 0.50 | Limit price for stop limit and take profit limit orders; otherwise null |
reduceOnly | boolean | false | |
side | string | buy | |
size | number | 31431.0 | |
status | string | open | Values are open , cancelled , and triggered |
trailStart | number | null | trigger price - trail value; only for trailing stop orders |
trailValue | number | null | only for trailing stop orders |
triggerPrice | number | 0.49 | market price at which this order will trigger |
triggeredAt | string | null | time of first trigger. null if never triggered |
type | string | stop | Values are stop , trailing_stop , and take_profit |
orderType | string | market | Values are market and limit |
filledSize | number | 31431 | |
avgFillPrice | number | 0.3701 | |
orderType | string | market | Values are market , limit |
filledSize | number | 0 | |
avgFillPrice | number | null | |
retryUntilFilled | boolean | false | Whether or not to keep re-triggering until filled |
Get TWAP orders
Request
GET /twap_orders?market={market}
Response
{
"success": true,
"result": [
{
"id": 50001,
"createdAt": "2019-03-05T09:56:55.728933+00:00",
"status": "running",
"market": "XRP-PERP",
"side": "buy",
"size": 1.003,
"type": "market",
"durationSeconds": 600,
"maxSpread": 0.01,
"maxIndividualOrderSize": 5.0,
"maxDistanceThroughBook": 0.1,
"priceBound": 5500,
"randomizeSize": false,
"filledSize": 0.5,
"avgFillPrice": 5000,
}
]
}
Requires authentication.
Supports pagination
Request parameters
Name | Type | Value | Description |
---|---|---|---|
market | string | BTC/USD | optional; When provided, only TWAP orders for this market are returned. |
Response format
Name | Type | Value | Description |
---|---|---|---|
id | number | 50001 | |
createdAt | string | 2019-03-05T09:56:55.728933+00:00 | |
status | string | open | If an order was successfully placed, status will be running . Possible values: running , expired , cancelled . |
market | string | BTC/USD | Optional; Ticker of the market. |
future | string | XRP-PERP | Optional; Ticker of the future. |
side | string | buy | One of buy or sell |
size | number | 31431.0 | |
type | string | market | One of market or limit . Determines the type of order that each TWAP execution sends. |
durationSeconds | number | 600 | In seconds, the duration this TWAP order will run for. |
randomizeSize | boolean | false | If true, each individual order for this TWAP will be sent with size bound by some [lower, upper] bound. |
maxSpread | number | 0.01 | Optional; When specified, an individual order for this TWAP will not be sent if market spread is higher than maxSpread. For %1 spread, this value will be 0.01. |
maxIndividualOrderSize | number | 0.01 | Optional; When specified, an individual order for this TWAP will be capped at maxIndividualOrderSize |
maxDistanceThroughBook | number | 0.01 | Optional; Max allowed distance of order price from market price. For 1% distance, this field will be 0.01. |
priceBound | number | 5500 | Optional; When specified, an individual order for this TWAP will not be sent if market price is above (for buys) or below (for sells) this price bound. |
filledSize | number | 0 | Total filled size of this TWAP. This value is updated throughout a TWAP's execution. |
avgFillPrice | number | null | Average price paid for the filled size. |
Get TWAP order executions
Request
GET /twap_orders/{twap_order_id}/executions
Response
{
"success": true,
"result": [
{
"id": 50001,
"createdAt": "2019-03-05T09:56:55.728933+00:00",
"status": "sent",
"statusReason": null,
"size": 0.5,
"filledSize": 0.5,
"avgFillPrice": 5000,
"orderStatus": "closed",
"orderType": "limit",
}
]
}
Requires authentication.
Supports pagination
Request parameters
Response format
Name | Type | Value | Description |
---|---|---|---|
id | number | 50001 | |
createdAt | string | 2019-03-05T09:56:55.728933+00:00 | |
status | string | sent | See table below for possible values. |
failureReason | string | 'insufficient_balance' | This field may be populated if status is not 'sent' and there is additional information about this error. See table below for possible values. |
size | number | 0.5 | Size of the order that was placed as part of this execution |
filledSize | number | 0.5 | Total filled size for this individual order. Total of all filledSize's for all individual orders within a TWAP is equal to the total filled size of the TWAP. |
avgFillPrice | number | 5000 | Average price paid for the filled size of this individual order. |
orderStatus | string | 'closed' | Status of the order that was sent as part of this execution. One of new , open , closed |
orderType | string | 'market' | Order type of the order that was sent as part of this execution. One of market , limit . |
Status format
Status | Description |
---|---|
sent |
Order was successfully sent. |
skipped_spread_higher_than_allowed |
This TWAP has a non-null maxSpread specified and this order was not sent because max spread was exceeded. |
skipped_remaining_size_too_small |
Remaining size for this TWAP is smaller than the minimum order size allowed for the market. This TWAP will stop execution after encountering this issue. |
skipped_run_size_too_small |
Order size for this individual run is smaller than the minimum order sized allowed for this market. |
skipped_place_order_failed |
Placing this individual order failed. The failureReason field will be populated if there is additional information available (e.g. not enough balances). |
skipped_last_order_not_closed |
The most recent order placed for this TWAP is still open. |
skipped_price_bound_exceeded |
This TWAP has a non-null priceBound specified, and the market price exceeded that price bound at the time this order was attempted to be executed. |
Failure reason format
Enum | Description |
---|---|
generic |
Generic failure. No additional information is available. |
insufficient_margin |
User did not have enough margin to send an order as part of this execution |
insufficient_balance |
User did not have enough balance to send an order as part of this execution. |
invalid_reduce_only_order |
This execution attempted to place a reduce-only order that would have been invalid (e.g. would have opened position). |
post_only_market |
This market is in post-only mode. |
account_being_liquidated |
The account was being liquidated at the time of TWAP execution. |
invalid_size |
Size for this execution was invalid. |
Place order
Request
POST /orders
{
"market": "BTC/USD",
"side": "sell",
"price": 0.306525,
"type": "limit",
"size": 31431.0,
"reduceOnly": false,
"ioc": false,
"postOnly": false,
"clientId": null,
}
Response
{
"success": true,
"result": {
"createdAt": "2019-03-05T09:56:55.728933+00:00",
"filledSize": 0,
"id": 9596912,
"market": "BTC/USD",
"price": 0.306525,
"remainingSize": 31431,
"side": "sell",
"size": 31431,
"status": "open",
"type": "limit",
"reduceOnly": false,
"ioc": false,
"postOnly": false,
"clientId": null,
}
}
Requires authentication.
Payload format
Name | Type | Value | Description |
---|---|---|---|
market | string | BTC/USD | |
side | string | sell | "buy" or "sell" |
price | number | 0.306525 | Send null for market orders. |
type | string | limit | "limit" or "market" |
size | number | 31431.0 | |
reduceOnly | boolean | false | optional; default is false |
ioc | boolean | false | optional; default is false |
postOnly | boolean | false | optional; default is false |
clientId | string | null | optional; client order id |
Response format
Name | Type | Value | Description |
---|---|---|---|
createdAt | string | 2019-03-05T09:56:55.728933+00:00 | |
filledSize | number | 0.0 | |
id | number | 9596912 | |
market | string | BTC/USD | |
price | number | 0.306525 | |
remainingSize | number | 31431.0 | |
side | string | sell | |
size | number | 31431.0 | |
status | string | new (accepted but not processed yet), open , or closed (filled or cancelled) |
|
type | string | limit | |
reduceOnly | boolean | false | |
ioc | boolean | false | |
postOnly | boolean | false | |
clientId | string | optional; client order id, if supplied |
Place trigger order
Trigger orders include stop, trailing stop, and take profit.
Request
POST /conditional_orders
- Stop
{
"market": "BTC/USD",
"side": "sell",
"triggerPrice": 0.306525,
"size": 31431.0,
"type": "stop",
"reduceOnly": false,
}
- Trailing stop
{
"market": "BTC/USD",
"side": "sell",
"trailValue": -0.05,
"size": 31431.0,
"type": "trailingStop",
"reduceOnly": false,
}
- Take profit
{
"market": "BTC/USD",
"side": "buy",
"triggerPrice": 0.367895,
"size": 31431.0,
"type": "takeProfit",
"reduceOnly": false,
}
Response
{
"success": true,
"result": {
"createdAt": "2019-03-05T09:56:55.728933+00:00",
"id": 9596912,
"market": "BTC/USD",
"triggerPrice": 0.306525,
"side": "sell",
"size": 31431,
"status": "open",
"type": "stop",
"orderPrice": null,
"triggeredAt": null,
"reduceOnly": false,
"orderType": "market",
"retryUntilFilled": false,
}
}
Requires authentication.
Payload format
Name | Type | Value | Description |
---|---|---|---|
market | string | BTC/USD | |
side | string | sell | "buy" or "sell" |
size | number | 31431.0 | |
type | string | stop | "stop", "trailingStop", "takeProfit"; default is stop |
reduceOnly | boolean | false | optional; default is false |
retryUntilFilled | boolean | false | Whether or not to keep re-triggering until filled. optional, default true for market orders |
Additional parameters for stop loss orders
Name | Type | Value | Description |
---|---|---|---|
triggerPrice | number | 0.306525 | |
orderPrice | number | 0.3063 | optional; order type is limit if this is specified; otherwise market |
Additional parameters for trailing stop orders
Name | Type | Value | Description |
---|---|---|---|
trailValue | number | -0.05 | negative for "sell"; positive for "buy" |
Additional parameters for take profit orders
Name | Type | Value | Description |
---|---|---|---|
triggerPrice | number | 0.306525 | |
orderPrice | number | 0.3067 | optional; order type is limit if this is specified; otherwise market |
Response format
Name | Type | Value | Description |
---|---|---|---|
createdAt | string | 2019-03-05T09:56:55.728933+00:00 | |
id | number | 9596912 | |
market | string | BTC/USD | |
triggerPrice | number | 0.306525 | |
side | string | sell | |
size | number | 31431.0 | |
status | string | Values are open , cancelled , and triggered |
|
type | string | stop | |
orderPrice | number | null | price of the order sent when this stop loss triggered |
triggeredAt | string | null | time at which this stop loss order triggered |
reduceOnly | boolean | false | |
orderType | string | market | Values are market , limit |
retryUntilFilled | boolean | false | Whether or not to keep re-triggering until filled |
Place TWAP order
Request
POST /twap_orders
{
"market": "XRP-PERP",
"side": "buy",
"size": 1.003,
"type": "market",
"durationSeconds": 600,
"maxSpread": 0.01,
"maxIndividualOrderSize": 5.0,
"maxDistanceThroughBook": 0.1,
"priceBound": 5500,
"randomizeSize": false,
"clientId": "your_client_order_id"
}
Response
{
"success": true,
"result": [
{
"id": 50001,
"createdAt": "2019-03-05T09:56:55.728933+00:00",
"status": "running",
"market": "XRP-PERP",
"side": "buy",
"size": 1.003,
"type": "market",
"durationSeconds": 600,
"maxSpread": 0.01,
"maxIndividualOrderSize": 5.0,
"maxDistanceThroughBook": 0.1,
"priceBound": 5500,
"randomizeSize": false,
"filledSize": 0.5,
"avgFillPrice": 5000,
}
]
}
Requires authentication.
Request parameters
Name | Type | Value | Description |
---|---|---|---|
market | string | BTC/USD | Ticker of the market. |
side | string | buy | One of buy or sell |
size | number | 31431.0 | |
type | string | market | One of market or limit . Determines the type of order that each TWAP execution sends. |
durationSeconds | number | 600 | In seconds, the duration this TWAP order will run for. |
randomizeSize | boolean | false | If true, each individual order for this TWAP will be sent with size bound by some [lower, upper] bound. |
maxSpread | number | 0.01 | Optional; When specified, an individual order for this TWAP will not be sent if market spread is higher than maxSpread. For %1 spread, this value will be 0.01. |
maxIndividualOrderSize | number | 0.01 | Optional; When specified, an individual order for this TWAP will be capped at maxIndividualOrderSize |
maxDistanceThroughBook | number | 0.01 | Optional; Max allowed distance of order price from market price. For 1% distance, this field will be 0.01. |
priceBound | number | 5500 | Optional; When specified, an individual order for this TWAP will not be sent if market price is above (for buys) or below (for sells) this price bound. |
Response format
Name | Type | Value | Description |
---|---|---|---|
id | number | 50001 | |
createdAt | string | 2019-03-05T09:56:55.728933+00:00 | |
status | string | open | If an order was successfully placed, status will be running . Possible values: running , expired , cancelled . |
market | string | BTC/USD | Optional; Ticker of the market. |
future | string | XRP-PERP | Optional; Ticker of the future. |
side | string | buy | One of buy or sell |
size | number | 31431.0 | |
type | string | market | One of market or limit . Determines the type of order that each TWAP execution sends. |
durationSeconds | number | 600 | In seconds, the duration this TWAP order will run for. |
randomizeSize | boolean | false | If true, each individual order for this TWAP will be sent with size bound by some [lower, upper] bound. |
maxSpread | number | 0.01 | Optional; When specified, an individual order for this TWAP will not be sent if market spread is higher than maxSpread. For %1 spread, this value will be 0.01. |
maxIndividualOrderSize | number | 0.01 | Optional; When specified, an individual order for this TWAP will be capped at maxIndividualOrderSize |
maxDistanceThroughBook | number | 0.01 | Optional; Max allowed distance of order price from market price. For 1% distance, this field will be 0.01. |
priceBound | number | 5500 | Optional; When specified, an individual order for this TWAP will not be sent if market price is above (for buys) or below (for sells) this price bound. |
filledSize | number | 0 | Total filled size of this TWAP. This value is updated throughout the execution of the TWAP. |
avgFillPrice | number | null | Average price paid for the filled size. |
Modify order
Request
POST /orders/{order_id}/modify
{
"size": 31431,
"price": 0.326525,
}
Response
{
"success": true,
"result": {
"createdAt": "2019-03-05T11:56:55.728933+00:00",
"filledSize": 0,
"id": 9596932,
"market": "BTC/USD",
"price": 0.326525,
"remainingSize": 31431,
"side": "sell",
"size": 31431,
"status": "open",
"type": "limit",
"reduceOnly": false,
"ioc": false,
"postOnly": false,
"clientId": null,
}
}
Please note that the order's queue priority will be reset, and the order ID of the modified order will be different from that of the original order. Also note: this is implemented as cancelling and replacing your order. There's a chance that the order meant to be cancelled gets filled and its replacement still gets placed.
Requires authentication.
Payload format
Name | Type | Value | Description |
---|---|---|---|
price | number | 0.306525 | optional; either price or size must be specified |
size | number | 31431.0 | optional; either price or size must be specified |
clientId | string | order1 | optional; client ID for the modified order |
Response format
Name | Type | Value | Description |
---|---|---|---|
createdAt | string | 2019-03-05T11:56:55.728933+00:00 | |
filledSize | number | 0.0 | |
id | number | 9596932 | |
market | string | BTC/USD | |
price | number | 0.326525 | |
remainingSize | number | 31431.0 | |
side | string | sell | |
size | number | 31431.0 | |
status | string | new (accepted but not processed yet), open , or closed (filled or cancelled) |
|
type | string | limit | |
reduceOnly | boolean | false | |
ioc | boolean | false | |
postOnly | boolean | false | |
clientId | string | optional; client order id, if supplied |
Modify order by client ID
Request
POST /orders/by_client_id/{client_order_id}/modify
{
"size": 31431,
"price": 0.326525,
}
Response
{
"success": true,
"result": {
"createdAt": "2019-03-05T11:56:55.728933+00:00",
"filledSize": 0,
"id": 9596932,
"market": "BTC/USD",
"price": 0.326525,
"remainingSize": 31431,
"side": "sell",
"size": 31431,
"status": "open",
"type": "limit",
"reduceOnly": false,
"ioc": false,
"postOnly": false,
"clientId": null,
}
}
Please note that the order's queue priority will be reset, and the order ID of the modified order will be different from that of the original order. Also note: this is implemented as cancelling and replacing your order. There's a chance that the order meant to be cancelled gets filled and its replacement still gets placed.
Requires authentication.
Payload format
Name | Type | Value | Description |
---|---|---|---|
price | number | 0.306525 | optional; either price or size must be specified |
size | number | 31431.0 | optional; either price or size must be specified |
clientId | string | order1 | optional; client ID for the modified order |
Response format
Name | Type | Value | Description |
---|---|---|---|
createdAt | string | 2019-03-05T11:56:55.728933+00:00 | |
filledSize | number | 0.0 | |
id | number | 9596932 | |
market | string | BTC/USD | |
price | number | 0.326525 | |
remainingSize | number | 31431.0 | |
side | string | sell | |
size | number | 31431.0 | |
status | string | new (accepted but not processed yet), open , or closed (filled or cancelled) |
|
type | string | limit | |
reduceOnly | boolean | false | |
ioc | boolean | false | |
postOnly | boolean | false | |
clientId | string | optional; client order id, if supplied |
Modify trigger order
Trigger orders include stop, trailing stop, and take profit.
Request
POST /conditional_orders/{order_id}/modify
- Stop
{
"triggerPrice": 0.306225,
"size": 31431.0,
}
- Trailing stop
{
"trailValue": -0.06,
"size": 31432.0,
}
- Take profit
{
"triggerPrice": 0.367885,
"size": 31433.0,
}
Response
{
"success": true,
"result": {
"createdAt": "2019-03-05T09:56:55.728933+00:00",
"id": 9596912,
"market": "BTC/USD",
"triggerPrice": 0.306225,
"side": "sell",
"size": 31431,
"status": "open",
"type": "stop",
"orderPrice": null,
"triggeredAt": null,
"reduceOnly": false,
"orderType": "market",
"filledSize": 0,
"avgFillPrice": null,
"retryUntilFilled": false
}
}
Requires authentication.
Payload format
Please note that the order ID of the modified order will be different from that of the original order.
Parameters for stop loss orders
Name | Type | Value | Description |
---|---|---|---|
size | number | 31431.0 | |
triggerPrice | number | 0.306525 | |
orderPrice | number | 0.3063 | only for stop limit orders |
Parameters for trailing stop orders
Name | Type | Value | Description |
---|---|---|---|
size | number | 31431.0 | |
trailValue | number | -0.05 | negative for sell orders; positive for buy orders |
Parameters for take profit orders
Name | Type | Value | Description |
---|---|---|---|
size | number | 31431.0 | |
triggerPrice | number | 0.306525 | |
orderPrice | number | 0.3067 | only for take profit limit orders |
Response format
Name | Type | Value | Description |
---|---|---|---|
createdAt | string | 2019-03-05T12:56:55.728933+00:00 | |
id | number | 9596912 | |
market | string | BTC/USD | |
triggerPrice | number | 0.306525 | |
side | string | sell | |
size | number | 31431.0 | |
status | string | Values are open , cancelled , and triggered |
|
type | string | stop | |
orderPrice | number | null | price of the order sent when this stop loss triggered |
triggeredAt | string | null | time at which this stop loss first triggered |
reduceOnly | boolean | false | |
orderType | string | market | Values are market , limit |
retryUntilFilled | boolean | false | Whether or not to keep re-triggering until filled |
Get order status
Request
GET /orders/{order_id}
Response
{
"success": true,
"result": {
"createdAt": "2019-03-05T09:56:55.728933+00:00",
"filledSize": 10,
"id": 9596912,
"market": "BTC/USD",
"price": 0.306525,
"avgFillPrice": 0.306526,
"remainingSize": 31421,
"side": "sell",
"size": 31431,
"status": "open",
"type": "limit",
"reduceOnly": false,
"ioc": false,
"postOnly": false,
"clientId": null
}
}
Requires authentication.
Response format
Name | Type | Value | Description |
---|---|---|---|
id | number | 9596912 | |
market | string | XRP-PERP | |
type | string | limit | |
side | string | sell | |
price | number | 0.306525 | |
size | number | 31431.0 | |
filledSize | number | 10.0 | |
remainingSize | number | 31421.0 | |
avgFillPrice | number | 0.306526 | |
status | string | new (accepted but not processed yet), open , or closed (filled or cancelled) |
|
createdAt | string | 2019-03-05T09:56:55.728933+00:00 | |
reduceOnly | boolean | false | |
ioc | boolean | false | |
postOnly | boolean | false | |
clientId | string | client order id |
Get order status by client id
Request
GET /orders/by_client_id/{client_order_id}
Response
{
"success": true,
"result": {
"createdAt": "2019-03-05T09:56:55.728933+00:00",
"filledSize": 10,
"id": 9596912,
"market": "BTC/USD",
"price": 0.306525,
"avgFillPrice": 0.306526,
"remainingSize": 31421,
"side": "sell",
"size": 31431,
"status": "open",
"type": "limit",
"reduceOnly": false,
"ioc": false,
"postOnly": false,
"clientId": "your_client_order_id"
}
}
Requires authentication.
Response format
Name | Type | Value | Description |
---|---|---|---|
id | number | 9596912 | |
market | string | BTC/USD | |
type | string | limit | |
side | string | sell | |
price | number | 0.306525 | |
size | number | 31431.0 | |
filledSize | number | 10.0 | |
remainingSize | number | 31421.0 | |
avgFillPrice | number | 0.306526 | |
status | string | new (accepted but not processed yet), open , or closed (filled or cancelled) |
|
createdAt | string | 2019-03-05T09:56:55.728933+00:00 | |
reduceOnly | boolean | false | |
ioc | boolean | false | |
postOnly | boolean | false | |
clientId | string | client order id |
Cancel order
Request
DELETE /orders/{order_id}
Response
{
"success": true,
"result": "Order queued for cancelation"
}
Requires authentication.
Cancel TWAP order
Request
DELETE /twap_orders/{twap_order_id}
Response
{
"success": true,
"result": "Order cancelled"
}
Requires authentication.
Cancel order by client id
Request
DELETE /orders/by_client_id/{client_order_id}
Response
{
"success": true,
"result": "Order queued for cancellation"
}
Requires authentication.
Cancel open trigger order
Request
DELETE /conditional_orders/{id}
Response
{
"success": true,
"result": "Order cancelled"
}
Requires authentication.
Cancel all orders
This will also cancel conditional orders (stop loss and trailing stop orders).
Request
DELETE /orders
{
"market": "BTC/USD",
}
Response
{
"success": true,
"result": "Orders queued for cancelation"
}
Requires authentication.
Payload format
Name | Type | Value | Description |
---|---|---|---|
market | string | BTC/USD | optional; restrict to cancelling orders only on this market |
side | string | buy | optional; restrict to cancelling orders only on this side |
conditionalOrdersOnly | boolean | false | optional; restrict to cancelling conditional orders only |
limitOrdersOnly | boolean | false | optional; restrict to cancelling existing limit orders (non-conditional orders) only |
Fills
Request
GET /fills?market={market}
Response
{
"success": true,
"result": [
{
"fee": 20.1374935,
"feeCurrency": "BTC",
"feeRate": 0.0005,
"id": 11215,
"liquidity": "taker",
"market": "BTC/USD",
"baseCurrency": null,
"quoteCurrency": null,
"orderId": 8436981,
"tradeId": 1013912,
"price": 4.201,
"side": "buy",
"size": 9587,
"time": "2019-03-27T19:15:10.204619+00:00",
"type": "order"
}
]
}
Requires authentication.
Supports pagination
Please note that fills generated by Converts will show up as 'type': 'otc'
Request parameters
Name | Type | Value | Description |
---|---|---|---|
market | string | BTC/USD | optional; market to limit fills |
start_time | number | 1564146934 | optional; minimum time of fills to return, in Unix time (seconds since 1970-01-01) |
end_time | number | 1564233334 | optional; maximum time of fills to return, in Unix time (seconds since 1970-01-01) |
order | string | null | optional; default is descending, supply 'asc' to receive fills in ascending order of time |
orderId | number | 50129784137 | optional; fetch fills for a specific order |
Response format
Name | Type | Value | Description |
---|---|---|---|
fee | number | 20.1374935 | |
feeCurrency | string | BTC | |
feeRate | number | 0.0005 | |
id | number | 11215 | fill id |
liquidity | string | taker | "taker" or "maker" |
market | string | BTC/USD | |
baseCurrency | string | BTC | |
quoteCurrency | string | USD | |
orderId | number | 8436981 | |
tradeId | number | 1013912 | null for trades before 2019-02-19 10:00:00 |
price | number | 4.201 | |
side | string | buy | |
size | number | 9587.0 | |
time | string | 2019-03-27T19:15:10.204619+00:00 | |
type | string | order |
Name | Type | Value | Description |
---|---|---|---|
id | number | 5 | |
size | number | 1.0 | |
price | number | 3.0 | |
option | option object; see List Quote Requests section | ||
time | string | "2020-01-08T02:59:57.270744+00:00" | |
liquidity | string | taker | "taker" or "maker" |
fee | number | 1.782852614186007 | |
feeRate | number | 0.0001729 | |
side | string | buy |
Convert
Request quote
Request
POST /otc/quotes
{
"fromCoin": "BTC",
"toCoin": "USD",
"size": 0.05
}
Response
{
"success": true,
"result": {
"quoteId": 1031
}
}
Requires authentication.
Payload format
Name | Type | Value | Description |
---|---|---|---|
fromCoin | string | BTC | |
toCoin | string | USD | |
size | number | 0.05 | denominated in units of fromCoin |
Response format
Name | Type | Value | Description |
---|---|---|---|
quoteId | number | 1031 |
Get quote status
Request
GET /otc/quotes/{quoteId}
Response
{
"success": true,
"result": [
{
"baseCoin": "BTC",
"cost": 0.05,
"expired": false,
"expiry": 1630355607.399486,
"filled": false,
"fromCoin": "BTC",
"id": 1031,
"price": 7695.4,
"proceeds": 384.77,
"quoteCoin": "USD",
"side": "sell",
"toCoin": "USD"
}
]
}
Requires authentication.
Request parameters
Name | Type | Value | Description |
---|---|---|---|
market | string | BTC/USD | optional; market to limit orders |
Response format
Name | Type | Value | Description |
---|---|---|---|
baseCoin | string | BTC | |
cost | number | 0.05 | cost of accepting the quote in units of fromCoin |
expired | bool | false | if the quote is expired (if so, cannot accep tit) |
filled | bool | false | if the quote is already accepted |
id | number | 1031 | |
price | number | 7695.4 | price in units of quoteCoin |
proceeds | number | 384.77 | proceeds of accepting the quote in units of toCoin |
quoteCoin | string | USD | |
side | string | "sell" | "sell" if fromCoin is baseCoin, otherwise "buy" |
toCoin | string | USD |
Accept quote
Request
POST /otc/quotes/{quote_id}/accept
Response
{
"success": true,
"result": null
}
Requires authentication.
Payload format
Name | Type | Value | Description |
---|---|---|---|
quoteId | number | 1031 |
Spot Margin
Get lending history
Request
GET /spot_margin/history
Supports pagination
Request parameters
Name | Type | Value | Description |
---|---|---|---|
start_time | number | 1559881511 | optional; only fetch history after this time |
end_time | number | 1559901511 | optional; only fetch history before this time |
Response
{
"success": true,
"result": [
{
"coin": "BTC",
"time": "2021-04-06T20:00:00+00:00",
"rate": 0.00002283,
"size": 615974048.2224404
}
]
}
Response format
Name | Type | Value | Description |
---|---|---|---|
coin | string | USD | |
time | string | 2021-04-06T20:00:00+00:00 | |
rate | number | 0.00002283 | hourly lending rate for this cycle |
size | number | 615974048.2224404 | total size matched between borrowers and lenders |
Get borrow rates
Request
GET /spot_margin/borrow_rates
Response
{
"success": true,
"result": [
{
"coin": "BTC",
"estimate": 1.45e-06,
"previous": 1.44e-06
}
]
}
Requires authentication.
Response format
Name | Type | Value | Description |
---|---|---|---|
coin | string | BTC | |
estimate | number | 1.45e-06 | estimated hourly borrow rate for the next spot margin cycle |
previous | number | 1.44e-06 | hourly borrow rate in the previous spot margin cycle |
Get lending rates
Request
GET /spot_margin/lending_rates
Response
{
"success": true,
"result": [
{
"coin": "BTC",
"estimate": 1.45e-06,
"previous": 1.44e-06
}
]
}
Response format
Name | Type | Value | Description |
---|---|---|---|
coin | string | BTC | |
estimate | number | 1.45e-06 | estimated hourly lending rate for the next spot margin cycle |
previous | number | 1.44e-06 | hourly lending rate in the previous spot margin cycle |
Get daily borrowed amounts
Request
GET /spot_margin/borrow_summary
Response
{
"success": true,
"result": [
{
"coin": "BTC",
"size": 120.1,
}
]
}
Response format
Name | Type | Value | Description |
---|---|---|---|
coin | string | BTC | |
size | number | 120.1 | average matched borrowed and lent amount over the last 24h |
Get market info
Request
GET /spot_margin/market_info?market={market}
Response
{
"success": true,
"result": [
{
"coin": "BTC",
"borrowed": 0.0,
"free": 3.87278021,
"estimatedRate": 1e-06,
"previousRate": 1e-06
},
{
"coin": "USD",
"borrowed": 0.0,
"free": 69966.22310497,
"estimatedRate": 1.027e-05,
"previousRate": 1.027e-05
}
]
}
Requires authentication.
Will return None if spot margin is not enabled in account settings.
Response format
Name | Type | Value | Description |
---|---|---|---|
coin | string | BTC | |
borrowed | number | 0.0 | amount of coin currently borrowed |
free | number | 3.87278021 | amount of coin that can be spent buying the other coin in the supplied market, including what's borrowable with margin |
estimatedRate | number | 1.45e-06 | estimated hourly borrow rate for the next spot margin cycle |
previousRate | number | 1.44e-06 | hourly borrow rate in the previous spot margin cycle |
Get my borrow history
Request
Supports pagination
GET /spot_margin/borrow_history
Response
{
"success": true,
"result": [
{
"coin": "BTC",
"cost": 0.00047864470072,
"rate": 1.961096e-05,
"size": 24.407,
"time": "2020-11-30T12:00:00+00:00"
}
]
}
Requires authentication.
Supports pagination
Request parameters
Name | Type | Value | Description |
---|---|---|---|
start_time | number | 1559881511 | optional; only fetch history after this time |
end_time | number | 1559901511 | optional; only fetch history before this time |
Response format
Name | Type | Value | Description |
---|---|---|---|
coin | string | BTC | |
cost | number | 0.00047864470072 | amount of coin you paid as interest on the borrow |
rate | number | 1.961096e-05 | borrow rate |
size | number | 24.407 | amount borrowed |
time | string | 2020-11-30T12:00:00+00:00 | time of interest payment |
Get my lending history
Request
Supports pagination
GET /spot_margin/lending_history
Response
{
"success": true,
"result": [
{
"coin": "BTC",
"proceeds": 0.00047864470072,
"rate": 1.961096e-05,
"size": 24.407,
"time": "2020-11-30T12:00:00+00:00"
}
]
}
Requires authentication.
Supports pagination
Request parameters
Name | Type | Value | Description |
---|---|---|---|
start_time | number | 1559881511 | optional; only fetch history after this time |
end_time | number | 1559901511 | optional; only fetch history before this time |
Response format
Name | Type | Value | Description |
---|---|---|---|
coin | string | BTC | |
proceeds | number | 0.00047864470072 | amount of coin you were paid as interest on the loan |
rate | number | 1.961096e-05 | lending rate |
size | number | 24.407 | amount lent |
time | string | 2020-11-30T12:00:00+00:00 | time of interest payment |
Get lending offers
Request
GET /spot_margin/offers
Response
{
"success": true,
"result": [
{
"coin": "BTC",
"rate": 1e-06,
"size": 1.0
}
]
}
Requires authentication.
Response format
Name | Type | Value | Description |
---|---|---|---|
coin | string | BTC | |
rate | number | 1e-06 | hourly rate at which you will lend, if matched |
size | number | 1.9 | amount you will lend, if matched |
Get lending info
Request
GET /spot_margin/lending_info
Response
{
"success": true,
"result": [
{
"coin": 'USD',
"lendable": 10026.5,
"locked": 100.0,
"minRate": 1e-06,
"offered": 100.0
}
]
}
Requires authentication.
Response format
Name | Type | Value | Description |
---|---|---|---|
coin | string | USD | |
lendable | number | 10026.5 | additional size you can lend |
locked | number | 100.0 | size either in lending offers or not yet unlocked from lending offers |
minRate | number | 1e-6 | minimum rate at which your offers will lend |
offered | number | 100.0 | size in your lending offers |
Submit lending offer
Request
POST /spot_margin/offers
{
"coin": "USD",
"size": 10.0,
"rate": 1e-6
}
Response
{
"success": true,
"result": null,
}
Requires authentication.
Payload format
Name | Type | Value | Description |
---|---|---|---|
coin | string | USD | |
size | number | 10.0 | |
rate | number | 1e-6 |
NFTs
Rest API for NFTs on FTX.
NFT endpoints base URL: https://ftx.com/api/nft
List NFTs
Request
GET /nft/nfts
Response
{
"success": true,
"result": [
{
"id": 123456,
"name": "Rare NFT",
"description": "Rare art",
"issuer": "FTX",
"collection": "FTX rare art",
"series": "Art for charity",
"solMintAddress": "8Jntdo3RMxQyGvuRkRjFA3aJ",
"ethContractAddress": "0x014Dc156cA770baC5475186834ecd2f624C990K",
"imageUrl": "https://www.static.ftx.com/art.jpg",
"videoUrl": "https://www.static.ftx.com/art.mp4",
"attributes": null,
"redeemable": true,
"redeemed": false,
"offerPrice": 1000.00,
"auction": {
"bestBid": 120.00,
"minNextBid": 125.00,
"endTime": "2021-06-11T07:23:24.106062+00:00",
"bids": 10
}
}
]
}
Response format
Name | Type | Value | Description |
---|---|---|---|
id | number | 123456 | unique ID of NFT |
name | string | Rare NFT | name of NFT |
description | string | Rare art | description of NFT |
issuer | string | FTX | entity issuing NFT |
collection | string | FTX rare art | NFT collection name |
series | string | Art for charity | NFT series |
solMintAddress | string | 8Jntdo3RMxQyGvuRkRjFA3aJ | |
ethContractAddress | string | 0x014Dc156cA770baC5475186834ecd2f624C990K | |
imageUrl | string | https://www.static.ftx.com/art.jpg | |
videoUrl | string | https://www.static.ftx.com/art.mp4 | |
attributes | string | null | |
redeemable | boolean | true | true if NFT is redeemable for goods |
redeemed | boolean | false | true if NFT is redeemable and has been redeemed |
offerPrice | number | 1000.00 | |
auction | array |
Get NFT info
Request
GET /nft/nft/{nft_id}
Response
{
"success": true,
"result": {
"id": 123456,
"name": "Rare NFT",
"description": "Rare art",
"issuer": "FTX",
"collection": "FTX rare art",
"series": "Art for charity",
"solMintAddress": "8Jntdo3RMxQyGvuRkRjFA3aJ",
"ethContractAddress": "0x014Dc156cA770baC5475186834ecd2f624C990K",
"imageUrl": "https://www.static.ftx.com/art.jpg",
"videoUrl": "https://www.static.ftx.com/art.mp4",
"attributes": null,
"redeemable": true,
"redeemed": false,
"offerPrice": 1000.00,
"auction": {
"bestBid": 120.00,
"minNextBid": 125.00,
"endTime": "2021-06-11T07:23:24.106062+00:00",
"bids": 10
}
}
}
Response format
Name | Type | Value | Description |
---|---|---|---|
id | number | 123456 | unique ID of NFT |
name | string | Rare NFT | name of NFT |
description | string | Rare art | description of NFT |
issuer | string | FTX | entity issuing NFT |
collection | string | FTX rare art | NFT collection name |
series | string | Art for charity | NFT series |
solMintAddress | string | 8Jntdo3RMxQyGvuRkRjFA3aJ | |
ethContractAddress | string | 0x014Dc156cA770baC5475186834ecd2f624C990K | |
imageUrl | string | https://www.static.ftx.com/art.jpg | |
videoUrl | string | https://www.static.ftx.com/art.mp4 | |
attributes | string | null | |
redeemable | boolean | true | true if NFT is redeemable for goods |
redeemed | boolean | false | true if NFT is redeemable and has been redeemed |
offerPrice | number | 1000.00 | |
auction | array |
Get NFT trades
Supports pagination
Request
GET /nft/{nft_id}/trades
Request parameters
Name | Type | Value | Description |
---|---|---|---|
start_time | number | 1559881511 | optional |
end_time | number | 1559881711 | optional |
Response
{
"success": true,
"result": [
{
"id": 490,
"price": 333.0,
"time": "2021-06-10T19:48:34.313252+00:00"
}, {
"id": 47,
"price": 350.0,
"time": "2021-06-03T14:18:40.496298+00:00"
}, {
"id": 42,
"price": 139.0,
"time": "2021-06-03T13:57:00.467274+00:00"
}
]
}
Response format
Name | Type | Value | Description |
---|---|---|---|
id | number | 42 | |
price | number | 333.0 | |
time | string | 2021-06-03T13:57:00.467274+00:00 |
Get all NFT trades
Supports pagination
Request
GET /nft/all_trades
Request parameters
Name | Type | Value | Description |
---|---|---|---|
start_time | number | 1559881511 | optional |
end_time | number | 1559881711 | optional |
Response
{
"success":true,
"result": [
{
"id":123,
"nft": {
"id": 123456,
"name": "Rare NFT",
"description": "Rare art",
"issuer": "FTX",
"collection": "FTX rare art",
"series": "Art for charity",
"solMintAddress": "8Jntdo3RMxQyGvuRkRjFA3aJ",
"ethContractAddress": "0x014Dc156cA770baC5475186834ecd2f624C990K",
"imageUrl": "https://www.static.ftx.com/art.jpg",
"videoUrl": "https://www.static.ftx.com/art.mp4",
"attributes": null,
"redeemable": true,
"redeemed": false,
"offerPrice": 1000.00,
"auction": {
"bestBid": 120.00,
"minNextBid": 125.00,
"endTime": "2021-06-11T07:23:24.106062+00:00",
"bids": 10
}
},
"price": 1450.0,
"time": "2021-06-09T15:39:15.364317+00:00"
}, {
"id": 124,
......
}
]
}
Response format
Name | Type | Value | Description |
---|---|---|---|
id | number | Rare NFT | NFT trade id |
nft | array | See List NFTs for details | |
price | number | 1450.0 | trade price of NFT |
time | string | 2021-06-09T15:39:15.364317+00:00 |
Get NFT account info
Request
GET /nft/{nft_id}/account_info
Response
{
"success": true,
"result": {
"bid": 120.00,
"buyFee": 6.00,
"isBestBid": False,
"owned": False
}
}
Response format
Name | Type | Value | Description |
---|---|---|---|
bid | number | 120.00 | |
buyFee | number | 6.00 | |
isBestBid | boolean | False | |
owned | boolean | False |
Get all NFT collections
Request
GET /nft/collections
Response
{
"success": true,
"result": [
{
"issuer": "FTX",
"collection":"FTX Special"
}, {
"issuer": "FTX",
"collection": "FTX Swag"
}, .....
]
}
Response format
Name | Type | Value | Description |
---|---|---|---|
issuer | string | FTX | issuer of NFT collection |
collection | string | FTX | NFT collection name |
Get NFT balances
Requires authentication.
Request
GET /nft/balances
Response
{
"success": true,
"result": [
{
"id": 123456,
"name": "Rare NFT",
"description": "Rare art",
"issuer": "FTX",
"collection": "FTX rare art",
"series": "Art for charity",
"solMintAddress": "8Jntdo3RMxQyGvuRkRjFA3aJ",
"ethContractAddress": "0x014Dc156cA770baC5475186834ecd2f624C990K",
"imageUrl": "https://www.static.ftx.com/art.jpg",
"videoUrl": "https://www.static.ftx.com/art.mp4",
"attributes": null,
"redeemable": true,
"redeemed": false,
"offerPrice": 1000.00,
"auction": {
"bestBid": 120.00,
"minNextBid": 125.00,
"endTime": "2021-06-11T07:23:24.106062+00:00",
"bids": 10
}
}
]
}
Response format
Name | Type | Value | Description |
---|---|---|---|
id | number | 123456 | unique ID of NFT |
name | string | Rare NFT | name of NFT |
description | string | Rare art | description of NFT |
issuer | string | FTX | entity issuing NFT |
collection | string | FTX rare art | NFT collection name |
series | string | Art for charity | NFT series |
solMintAddress | string | 8Jntdo3RMxQyGvuRkRjFA3aJ | |
ethContractAddress | string | 0x014Dc156cA770baC5475186834ecd2f624C990K | |
imageUrl | string | https://www.static.ftx.com/art.jpg | |
videoUrl | string | https://www.static.ftx.com/art.mp4 | |
attributes | string | null | |
redeemable | boolean | true | true if NFT is redeemable for goods |
redeemed | boolean | false | true if NFT is redeemable and has been redeemed |
offerPrice | number | 1000.00 | |
auction | array |
Make NFT offer
Requires authentication.
Request
POST /nft/offer
Request parameters
Name | Type | Value | Description |
---|---|---|---|
nftId | int | 12345 | |
price | number | 500.0 |
Response
See /nft/{nftId}
Buy NFT
Requires authentication.
Request
POST /nft/buy
Request parameters
Name | Type | Value | Description |
---|---|---|---|
nftId | int | 12345 | |
price | number | 500.0 |
Response
See /nft/{nftId}
Create Auction
Requires authentication.
Request
POST /nft/auction
Request parameters
Name | Type | Value | Description |
---|---|---|---|
initialPrice | number | 120.0 | |
reservationPrice | number | 500.0 | |
duration | int | 3600 | duration in seconds |
Response
See /nft/{nftId}
Edit Auction
Requires authentication.
Request
POST /nft/edit_auction
Request parameters
Name | Type | Value | Description |
---|---|---|---|
reservationPrice | number | 600.0 |
Response
See /nft/{nftId}
Cancel Auction
Requires authentication.
Request
POST /nft/cancel_auction
Request parameters
Name | Type | Value | Description |
---|---|---|---|
nftId | number | 12345 | |
reservationPrice | number | 500.0 |
Response
See /nft/{nftId}
Get bids
Requires authentication.
Request
GET /nft/bids
Response
See /nft/nfts
Place bid
Requires authentication.
Request
POST /nft/bids
Request parameters
Name | Type | Value | Description |
---|---|---|---|
nftId | number | 12345 | |
price | number | 500.0 |
Response
See /nft/{nftId}
Get NFT deposits
Requires authentication.
Supports pagination
Request
GET /nft/deposits
Request parameters
Name | Type | Value | Description |
---|---|---|---|
start_time | number | 1559881511 | optional |
end_time | number | 1559881711 | optional |
Response
{
"success": true,
"result": [
{
"id": 999899,
"nft": {
See /nfts,
},
"status": "confirmed",
"time": "2021-06-10T09:15:43.136561+00:00",
"sentTime": "2021-06-11T07:23:24.106062+00:00",
"confirmedTime": "2021-06-11T07:27:40.237006+00:00",
"confirmations": 8,
}, {
"id": 777877,
.....
},
]
}
Response format
Name | Type | Value | Description |
---|---|---|---|
id | int | 999899 | |
nft | array | See List NFTs for details | |
status | string | confirmed | one of: unconfirmed, confirmed, cancelled |
time | string | 2021-06-10T09:15:43.136561+00:00 | NFT created at |
sentTime | string | 2021-06-11T07:23:24.106062+00:00 | |
confirmedTime | string | 2021-06-11T07:27:40.237006+00:00 | |
confirmations | int | 8 |
Get NFT withdrawals
Requires authentication.
Supports pagination
Request
GET /nft/withdrawals
Request parameters
Name | Type | Value | Description |
---|---|---|---|
start_time | number | 1559881511 | optional |
end_time | number | 1559881711 | optional |
Response
{
"success": true,
"result": [
{
"id": 12345,
"nft": {
See /nfts,
},
"address": "0x014Dc156cA770baC5475186834ecd2f624C990K",
"method": "erc20",
"txid": "0x8078356ae4b06a036d64747546c274af19581f1c78c510b60505798a7ffcaf1",
"fee": "20.0",
"status": "sent",
"time": "2021-06-11T07:23:24.106062+00:00",
"notes": null
}, {
"id": 45678,
.....
},
]
}
Response format
Name | Type | Value | Description |
---|---|---|---|
id | number | 12345 | |
nft | array | See List NFTs for details | |
address | string | 0x014Dc156cA770baC5475186834ecd2f624C990K | |
method | string | erc20 | erc20 or sol |
txid | string | 0x8078356ae4b06a036d64747546c274af19581f1c78c510b60505798a7ffcaf1 | |
fee | number | 20.0 | |
status | string | confirmed | one of: requested, processing, sent, completed, cancelled |
time | string | 2021-06-11T07:23:24.106062+00:00 | |
notes | string | null |
Get NFT fills
Requires authentication.
Supports pagination
Request
GET /nft/fills
Request parameters
Name | Type | Value | Description |
---|---|---|---|
start_time | number | 1559881511 | optional |
end_time | number | 1559881711 | optional |
Response
{
"success": true,
"result": [
{
"id": 12345,
"nft": {
See /nfts,
},
"side": "buy",
"price": 150.0,
"fee": 7.5,
"time": "2021-06-11T07:23:24.106062+00:00"
}, {
"id": 45678,
.....
},
]
}
Response format
Name | Type | Value | Description |
---|---|---|---|
id | number | 12345 | |
nft | array | See List NFTs for details | |
side | string | buy | trade price of NFT |
price | number | 150.0 | |
fee | number | 7.5 | |
time | string | 2021-06-09T15:39:15.364317+00:00 |
Redeem NFT
Requires authentication.
Request
POST /nft/redeem
Request parameters
Name | Type | Value | Description |
---|---|---|---|
nftId | number | 12345 | |
address | string | ||
notes | string |
Response
{
"success": true,
"result": {
"id": 12345,
"nft": {
See /nfts,
},
"time": "2021-06-11T07:23:24.106062+00:00",
"notes": null
"address": "0x014Dc156cA770baC5475186834ecd2f624C990K",
"status": "redeemed",
"supportTicketId": 1014
}
}
Response format
Name | Type | Value | Description |
---|---|---|---|
id | number | 12345 | |
nft | array | See List NFTs for details | |
time | string | 2021-06-09T15:39:15.364317+00:00 | |
notes | string | null | |
address | string | 0x014Dc156cA770baC5475186834ecd2f624C990K | |
status | string | confirmed | one of: requested, pending_review, processing, sent, complete, cancelled, failed |
supportTicketId | int | 1014 | id of associated support ticket |
Get NFT gallery
Requires authentication.
Request
GET /nft/gallery/{gallery_id}
Request parameters
Name | Type | Value | Description |
---|---|---|---|
gallery_id | number | 12345 | NFT gallery id |
Response
{
"success": true
"result": {
"name": "My-Awesome-NFTs",
"nfts": [
See /nfts
]
}
}
Response format
Name | Type | Value | Description |
---|---|---|---|
name | string | My-Awesome-NFTs | name of NFT gallery |
nfts | array | See List NFTs |
Get gallery settings
Requires authentication.
Request
GET /nft/gallery_settings
Response
{
"success": true
"result": {
"id": 888789,
"public": true
}
}
Response format
Name | Type | Value | Description |
---|---|---|---|
id | number | 888789 | NFT gallery id |
public | boolean | true | true if NFT gallery is public |
Edit gallery settings
Requires authentication.
Request
POST /nft/gallery_settings
Request parameters
Name | Type | Value | Description |
---|---|---|---|
public | boolean | true | set NFT gallery public or private |
FTX Pay
Get app details and payments
Request
GET /ftxpay/apps/<int:user_specific_id>/details
Get the details of an FTXPay app, along with a list of payments to that app.
Note that user_specific_id
is the id of this app specific to your account as a merchant.
It is the ID you see in your URL when you visit an FTXPay app-related pages; e.g. if you look at your app by visiting
ftx.com/pay/apps/2, you would supply 2 as the user_specific_id
to fetch its details via API.
The below parameters are optional, and are used for filtering
Name | Type | Value | Description |
---|---|---|---|
start_time | number | 1559881511 | optional; only fetch payments created after this time |
end_time | number | 1559901511 | optional; only fetch payments created before this time |
limit | number | 100 | optional; default 200, maximum 500 |
Supports pagination
Response
{
"success": true,
"result": [
{
"id": 1031,
"name": "Hot dog stand",
"email": "[email protected]",
"userSpecificId": 2,
"acceptedCoin": "ETH",
"withdrawalAddress": "0x8bb861C4650a0D9fDc83a6792CE3F882F5B8e56e",
"withdrawalWallet": "erc20",
"withdrawalPeriod": 24,
"disabled": false,
"deleted": false,
"createdAt": "2021-04-19T22:52:33.919391+00:00",
"totalValue": 384.94232204,
"numPayments": 2,
"payments": [
{
"id": 6124443,
"feeSize": 0.0002,
"netSize": 0.0198,
"tipSize": 0,
"coin": "ETH",
"createdAt": "2021-04-23T08:42:14.933361+00:00",
"memo": "153126",
"notes": "Payment for delicious hot dogs"
"senderEmail": "[email protected]"
},
{
"id": 6239120,
"feeSize": 0.0017,
"netSize": 0.1485,
"tipSize": 0.0223,
"coin": "ETH",
"createdAt": "2021-04-24T10:33:14.034661+00:00",
"memo": "934110",
"notes": "Catering",
"senderEmail": "[email protected]"
},
]
}
]
}
Response format for app
Name | Type | Value | Description |
---|---|---|---|
id | number | 1031 | internal ID, unique across users |
name | number | Hot dog stand | |
string | [email protected] | optional; email to receive confirmations | |
userSpecificId | number | 2 | user-specific ID, unique for a single user |
acceptedCoin | string | ETH | optional; coin that all payments must be in |
withdrawalAddress | string | 0x8bb861C4650a0D9fD... | optional; address to auto-withdraw funds to |
withdrawalWallet | string | erc20 | optional; wallet type for auto-withdrawal |
withdrawalPeriod | number | 24 | optional; auto-withdrawal period (in hours) |
disabled | boolean | false | |
deleted | boolean | false | |
createdAt | string | 2021-04-19T22:52:33.919391+00:00 | time the app was created |
totalValue | number | 384.94232204 | total value of all fetched payments |
numPayments | number | 2 | quantity of fetched payments |
Response format for payment
Name | Type | Value | Description |
---|---|---|---|
id | number | 6239120 | unique ID of payment |
feeSize | number | 0.0017 | amount of the fee |
netSize | number | 0.1485 | amount received |
tipSize | number | 0.0223 | amount tipped (in addition to netSize) |
coin | string | ETH | |
createdAt | string | 2021-04-24T10:33:14.034661+00:00 | time of the payment |
memo | string | 934110 | optional; payer-provided info for payment identification |
notes | string | Catering | optional; payer-provided notes |
senderEmail | string | [email protected] | email of the sender |
Create order
You can pre-register an order, specifying its size and currency, and track its status. When you supply an ID identifying the order to an FTX Pay popup, completion of the payment will also update the status of the order.
To supply an ID, the link you should send payers to (or spawn in a popup for them) is: https://ftx.us/pay/request?id=APP_ID&orderId=ORDER_ID
or https://ftx.us/pay/request?id=APP_ID&clientOrderId=CLIENT_ORDER_ID
The below endpoint describes how to register an order, and the following one describes how to track your orders.
Request
POST /ftxpay/apps/<int:user_specific_id>/orders_by_usid
POST /ftxpay/apps/<int:app_id>/orders
{
"coin": "USD",
"notes": "Order for hot dog #11",
"size": 12.0,
"allowTip": true,
"clientId": "my-client-id-12345"
}
Response
{
"success": true,
"result": {
"id": 5,
"coin": "USD",
"notes": "Order for hot dog #11",
"size": 12.0,
"allowTip": true,
"clientId": "my-client-id-12345"
"status": "incomplete"
}
}
Requires authentication.
Payload format
Name | Type | Value | Description |
---|---|---|---|
coin | string | USD | the currency of the payment |
notes | string | Order for hot dog #11 | optional; notes about this order that are private to the merchant |
size | number | 12.0 | size of the desired payment |
allowTip | boolean | true | whether or not tips are allowed for the payment |
clientId | string | my-client-id-12345 | optional; ID for you to track the order with (must be unique to your FTX Pay app) |
Response format
Name | Type | Value | Description |
---|---|---|---|
id | number | 5 | canonical ID of the order |
coin | string | USD | the currency of the payment |
notes | string | Order for hot dog #11 | optional; notes about this order that are private to the merchant |
size | number | 12.0 | size of the desired payment |
allowTip | boolean | true | whether or not tips are allowed for the payment |
clientId | string | my-client-id-12345 | optional; ID for you to track the order with (must be unique to your FTX Pay app) |
status | string | incomplete | "incomplete" or "complete" |
Get orders
Supports pagination
Request
GET /ftxpay/apps/<int:user_specific_id>/orders_by_usid
GET /ftxpay/apps/<int:app_id>/orders
Response
{
"success": true,
"result": [
{
"id": 5,
"clientOrderId": "my-client-id-12345",
"coin": "USD",
"size": 12.0,
"allowTip": true,
"status": "complete",
"notes": "Order for hot dog #11",
"payment": {
"id": 3,
"feeSize": 0.14,
"netSize": 11.88,
"tipSize": 1.78,
"coin": "USD",
"createdAt": "2021-07-14T22:27:11.041873+00:00",
"memo": "",
"notes": ""
}
}
]
}
Requires authentication.
Response format
Name | Type | Value | Description |
---|---|---|---|
id | number | 5 | canonical ID of the order |
coin | string | USD | the currency of the payment |
notes | string | Order for hot dog #11 | optional; notes about this order that are private to the merchant |
size | number | 12.0 | size of the desired payment |
allowTip | boolean | true | whether or not tips are allowed for the payment |
clientId | string | my-client-id-12345 | optional; ID for you to track the order with (must be unique to your FTX Pay app) |
status | string | complete | "incomplete" or "complete" |
payment | dict | payment object; null if a payment is incomplete |
Get single client order
Request
GET /ftxpay/apps/<int:user_specific_id>/<int:order_id>/single_order_by_usid
GET /ftxpay/apps/<int:app_id>/<int:order_id>/single_order
Response
{
"success": true,
"result":
{
"id": 5,
"clientOrderId": "my-client-id-12345",
"coin": "USD",
"size": 12.0,
"allowTip": true,
"status": "complete",
"notes": "Order for hot dog #11",
"payment": {
"id": 3,
"feeSize": 0.14,
"netSize": 11.88,
"tipSize": 1.78,
"coin": "USD",
"createdAt": "2021-07-14T22:27:11.041873+00:00",
"memo": "",
"notes": ""
}
}
}
Requires authentication.
Response format
Name | Type | Value | Description |
---|---|---|---|
id | number | 5 | canonical ID of the order |
coin | string | USD | the currency of the payment |
notes | string | Order for hot dog #11 | optional; notes about this order that are private to the merchant |
size | number | 12.0 | size of the desired payment |
allowTip | boolean | true | whether or not tips are allowed for the payment |
clientId | string | my-client-id-12345 | optional; ID for you to track the order with (must be unique to your FTX Pay app) |
status | string | complete | "incomplete" or "complete" |
payment | dict | payment object; null if a payment is incomplete |
Cancel order
Cancels an order, preventing it from being filled by a future FTX Pay payment. Can only be used on orders that have not already been filled or cancelled.
Request
DELETE /ftxpay/apps/<int:user_specific_id>/<int:order_id>/orders_by_usid
DELETE /ftxpay/apps/<int:app_id>/<int:order_id>/orders
Response
{
"success": true,
}
Return payment
You can return a payment by specifying your app ID and the payment ID. The amount paid to you (including the tip, but without the fee that was already applied) will be returned to the payer. You may optionally specify an amount between 0 and the full amount of the payment less the fee to be returned instead.
Request
POST /ftxpay/<int:app_id>/<int:payment_id>/return
{
"size": "9.9"
}
Response
{
"success": true,
"result": null
}
Requires authentication.
Payload format
Name | Type | Value | Description |
---|---|---|---|
size | number | 9.9 | optional; amount of the payment to return (if left unspecified, defaults to the full amount) |
Reserve address
By specifying an order and associated app, you may request that a wallet address be reserved for the purpose of completing an FTX Pay payment by sending cryptocurrency from an external wallet. The wallet address will be reserved for 6 hours. If the currency associated with the order is different from the coin specified in the request, we will additionally return a quote, which will be automatically accepted upon receipt of the payment (and used to convert to the currency requested by the merchant).
Request
POST /ftxpay/apps/<int:app_id>/<int:order_id>/orders/reserve_address
{
"reservedAddressWallet": "erc20",
"coin": "ETH",
"email": "[email protected]",
}
Response
{
"quote": {
"id": 61334404,
"baseCoin": "ETH",
"quoteCoin": "USD",
"side": "sell",
"fromCoin": "ETH",
"toCoin": "USD",
"cost": 0.0035,
"proceeds": 10.0,
"price": 2857.14285714,
"filled": "false",
"expired": "false",
"expiry": 1632995813,
}
"address": "0x8bb861C4650a0D9fDc83a6792CE3F882F5B8e56e"
}
Requires authentication.
Payload format
Name | Type | Value | Description |
---|---|---|---|
reservedAddressWallet | string | erc20 | The wallet used by the cryptocurrency payment (erc20, btc, sol, doge, ltc, or bch) |
coin | string | ETH | The coin sent in the cryptocurrency payment |
string | [email protected] | optional; the email address of the payer, used for recovery of unused funds |
Response format
Name | Type | Value | Description |
---|---|---|---|
id | number | 61334404 | canonical ID of the quote |
baseCoin | string | ETH | the primary currency of the quote |
quoteCoin | string | USD | the secondary currency of the quote |
side | string | sell | "buy" if the quote is to buy the primary currency, otherwise "sell" |
fromCoin | string | ETH | the currency the payer is paying |
toCoin | string | USD | the currency the merchant is receiving |
cost | number | 0.0035 | the amount of the fromCoin paid by the payer |
proceeds | number | 10.0 | the amount of the toCoin received by the merchant (before fees) |
price | number | 2857.14285714 | the price of the primary currency in terms of the secondary currency |
filled | boolean | false | whether or not the quote has been used |
expired | boolean | false | whether or not the quote has expired |
expiry | integer | 1632995813 | the UNIX timestamp of the quote's expiry |
address | string | 0x8bb861C4650a0D9fDc83a6792CE3F882F5B8e56e | the address to which the payer must send the currency |
Websocket updates
If you want to be informed about payments to your FTX Pay apps as soon as they happen, subscribe to the FTX Pay websocket channel.
Latency statistics
See latency statistics for a period of time and for one or all subaccounts.
days
specifies the time period, from days
days ago up to now - defaults to 1.
You can specify a subaccount by passing its nickname to subaccount_nickname
, or specify the main account by using subaccount_nickname='_main'
. Leaving this field blank will return results aggregated across all subaccounts.
Request
GET /stats/latency_stats?days={days}&subaccount_nickname={subaccount_nickname}
Parameters
Name | Type | Value | Description |
---|---|---|---|
days | int | 5 | Optional. Number of days in the past to check. |
subaccount_nickname | str | '_main' | Optional. Subaccount name to get stats for specific subaccount (or main). |
Response format
Response
{
"success": true,
"result": [
{
"bursty": true,
"p50": 0.059,
"requestCount": 43,
},
{
"bursty": false,
"p50": 0.047,
"requestCount": 27
},
]
}
Name | Type | Value | Description |
---|---|---|---|
bursty | boolean | true | Whether the orders are "bursty" (two or more orders sent from the same account simultaneously) |
p50 | number | 0.059 | 50th-percentile latency experienced by your account in the last 24 hours |
requestCount | number | 43 | Number of orders placed by your account in the last 24 hours |
Support tickets
Get all support tickets
Get all your support tickets (limit 100).
Requires authentication.
Request
GET /support/tickets
Response
{
"success": true,
"result": [
{
"id": 42,
"title": "Support ticket for your GBP deposit",
"time": "2021-07-14T22:27:11.041873+00:00",
"category": "fiat deposit",
"status": "open",
"error": None,
"fiatDeposit": {
"id": 37,
"coin": "GBP",
"size": 12.34,
"status": "complete",
"time": "2021-07-13T22:27:11.041873+00:00",
"confirmedTime": "2021-07-13T22:27:12.041873+00:00",
"uploadedFile": None,
"uploadedFileName": None,
"cancelReason": None,
"fiat": True,
"ach": False,
"type": "bank"
},
"depositHelpRequest": None,
"autoExpireAt": None
},
{
"id": 43,
"title": "BUSD not arriving.",
"time": "2021-07-15T22:27:11.041873+00:00",
"category": "crypto deposit",
"status": "open",
"error": None,
"fiatDeposit": None,
"depositHelpRequest": {
"id": 73,
"coin": "BUSD",
"wallet": "bsc",
"txid": "0xd232f8a398c8ed84a4344ab0076a0af0735a30fab7698541bee96230274de13e",
"size": None,
"transactionTime": "2021-07-14T21:27:11.041873+00:00",
"creditedSize": None
},
"autoExpireAt": None
},
{
"id": 44,
"title": "Help",
"time": "2021-07-16T22:27:11.041873+00:00",
"category": "other",
"status": "closed",
"error": None,
"fiatDeposit": None,
"depositHelpRequest": None,
"autoExpireAt": None
}
]
}
Response format
Name | Type | Value | Description |
---|---|---|---|
id | number | 42 | Support ticket ID |
title | string | "Support ticket for your GBP deposit" | Support ticket title |
time | string | "2021-07-14T22:27:11.041873+00:00" | Support ticket creation time |
category | string | "fiat deposit" | Support ticket category |
status | string | "open" | Support ticket status |
error | string | None | Support ticket error; null if no error |
fiatDeposit | dict | None | Fiat deposit this support ticket relates to; null if not a fiat deposit ticket |
depositHelpRequest | dict | None | Deposit help request this support ticket relates to; null if not a crypto deposit ticket |
autoExpireAt | strong | None | Time at which the ticket expires; null by default |
Get support ticket messages
View all messages for one support ticket. You can only view messages for support tickets for your account.
Requires authentication.
Request
GET /support/tickets/<int:ticket_id>/messages
Response
{
"ticket": {
"id": 44,
"title": "Help",
"time": "2021-07-16T22:27:11.041873+00:00",
"category": "other",
"status": "closed",
"error": None,
"fiatDeposit": None,
"depositHelpRequest": None,
"autoExpireAt": None
},
"messages": [
{
"id": 164,
"message": "I need help.",
"uploadedFileName": None,
"authorIsCustomer": True,
"time": "2021-07-16T22:27:11.041873+00:00"
},
{
"id": 173,
"message": "Can you elaborate?",
"uploadedFileName": None,
"authorIsCustomer": False,
"time": "2021-07-16T22:47:11.041873+00:00"
},
{
"id": 189,
"message": "I don't know where to find the FTX API documentation.",
"authorIsCustomer": True,
"time": "2021-07-16T23:27:11.041873+00:00"
},
{
"id": 191,
"message": "You can find it at https://docs.ftx.com/.",
"authorIsCustomer": False,
"time": "2021-07-16T23:29:11.041873+00:00"
},
{
"id": 201,
"message": "Great, thank you!",
"authorIsCustomer": True,
"time": "2021-07-16T23:30:11.041873+00:00"
}
]
}
Parameters
Name | Type | Value | Description |
---|---|---|---|
ticket_id | int | 42 | ID of the support ticket you want to view |
Response format
Name | Type | Value | Description |
---|---|---|---|
ticket | dict | Ticket object (see above) | |
messages | list | List of message objects (see below) |
Message object format
Name | Type | Value | Description |
---|---|---|---|
id | number | 164 | Message ID |
message | string | "I need help." | Content of the message |
uploadedFileName | string | None | File attached to the message; null if no such file |
authorIsCustomer | bool | True | True if the author of the message is the customer, false if the author is one of our support team members |
time | string | "2021-07-16T23:30:11.041873+00:00" | The time at which the message was sent |
Send a support message
Send a new message to one of your support tickets. Note that there is a limit of 100 messages per ticket.
Requires authentication.
Request
POST /support/tickets
Content-Type: multipart/form-data
Response
{
"success": true,
"result": null
}
Payload format
Name | Type | Value | Description |
---|---|---|---|
title | string | "Help" | Title of your new support ticket. |
category | string | "other" | Category for your new support ticket. |
message | string | "I need help." | Initial message for your new support ticket. |
fiatDepositId | int | None | Optional. ID of the fiat deposit relating to your new support ticket. |
supportFile | file | None | Optional. Supported file formats (.png .jpg .pdf .doc .docx) |
Send a support message
Send a new message to one of your support tickets. Note that there is a limit of 100 messages per ticket.
Requires authentication.
Request
POST /support/tickets/<int:ticket_id>/messages
Content-Type: multipart/form-data
Response
{
"success": true,
"result": null
}
Payload format
Name | Type | Value | Description |
---|---|---|---|
ticket_id | int | 44 | The ID of the ticket you want to send to. |
message | string | "Thank you." | The message you want to send. |
supportFile | file | None | Optional. Supported file formats (.png .jpg .pdf .doc .docx) |
Update the status of your support ticket
Requires authentication.
Request
POST /support/tickets/<int:ticket_id>/status
{
"status": "closed"
}
Response
{
"success": true,
"result": null
}
Payload format
Name | Type | Value | Description |
---|---|---|---|
ticket_id | int | 44 | The ID of the ticket you want to update. |
status | string | "closed" | "closed" to close an open support ticket and "open" to reopen a closed one. |
Count total number of unread support messages
Returns the total number of unread messages across all your support tickets.
Requires authentication.
Request
GET /support/tickets/count_unread
Response
{
"success": true,
"result": 42
}
Mark support messages read
Marks all support messages for the given ticket as read.
Requires authentication.
Request
POST /support/tickets/<int:ticket_id>/mark_as_read
Response
{
"success": true,
"result": null
}
Websocket API
Streaming API with the most up-to-date market and account order data. With this API, you can send messages to a server and receive event-driven responses without having to poll the server for a reply.
Websocket endpoint URL: wss://ftx.us/ws/
Requests and responses use JSON.
You can find sample code here: https://github.com/ftexchange/ftx
Request process
Websocket connections go through the following lifecycle:
- Establish a websocket connection with
wss://ftx.us/ws/
- (Optional) Authenticate with
{op: 'login', 'args': {'key': <api_key>, 'sign': <signature>, 'time': <ts>}}
- Send pings at regular intervals (every 15 seconds):
{op: 'ping'}
. You will see an{op: 'pong'}
response. - Subscribe to a channel with
{'op': 'subscribe', 'channel': 'trades', 'market': 'BTC/USD'}
- Receive subscription response
{'type': 'subscribed', 'channel': 'trades', 'market': 'BTC/USD'}
- Receive data
{'type': 'partial', 'channel': 'trades', 'market': 'BTC/USD', 'data': {'bid': 5230.5, 'ask': 5231.0, 'ts': 1557133490.4047449, 'last': 5230.5}}
- Unsubscribe
{'op': 'unsubscribe', 'channel': 'trades', 'market': 'BTC/USD'}
- Receive unsubscription response
{'type': 'unsubscribed', 'channel': 'trades', 'market': 'BTC/USD'}
Request format
Messages sent to the server should contain the following dictionary items:
channel
: The channel for which you want data. Should be one oforderbook
for orderbook market datatrades
for trade market dataticker
for best bid and offer market data
market
: The market for which you want data. Example:BTC/USD
op
: The operation you want to run. Should be one ofsubscribe
to subscribe to a channelunsubscribe
to unsubscribe from a channel
Response format
channel
market
type
: The type of messageerror
: Occurs when there is an error. Whentype
iserror
, there will also be acode
andmsg
field.code
takes on the values of standard HTTP error codes.subscribed
: Indicates a successful subscription to the channel and market.unsubscribed
: Indicates a successful unsubscription to the channel and market.info
: Used to convey information to the user. Is accompanied by acode
andmsg
field.- When our servers restart, you may see an
info
message with code20001
. If you do, please reconnect.
- When our servers restart, you may see an
partial
: Contains a snapshot of current market data. The data snapshot can be found in the accompanyingdata
field.update
: Contains an update about current market data. The update can be found in the accompanyingdata
field.
code
(optional)msg
(optional)data
(optional)
Public Channels
Ticker
The ticker
channel provides the latest best bid and offer market data. All messages are updates (update
), and the data
field contains:
- bid
: Best bid price if a bid exists, else null
- ask
: Best ask price if an ask exists, else null
- last
: Last trade price if it exists, else null
- time
: Timestamp
Markets
The markets
channel provides information on the full set of tradable markets and their specifications. After subscription and once per minute, you will receive a partial
message with information on all markets. If there are updates to markets (listings, delistings, or changes to specs), you will be notified through update
messages. The data
field both types of messages will contain a list of market information dictionaries, each of which contains:
name
: name of the marketenabled
: if the market is enabledpriceIncrement
: price tick sizesizeIncrement
: min size steptype
: 'future' or 'spot'baseCurrency
: base currency if spot, elsenull
quoteCurrency
: quote currency if spot, elsenull
underlying
: underlying if future, elsenull
restricted
: if the market has nonstandard restrictions on which jurisdictions can trade it
Trades
The trades
channel provides data on all trades in the market. All messages are updates of new trades (update
) and the data
field contains:
- price
: Price of the trade
- size
: Size of the trade
- side
: Side of the taker in the trade
- liquidation
: true
if the trade involved a liquidation order, else false
- time
: Timestamp
Orderbooks
The orderbook
channel provides data about the orderbook's best 100 orders on either side.
Initial snapshot
Upon subscribing, you will receive one snapshot of the orderbook (partial
) with a data
field containing:
action
:partial
bids
asks
checksum
: see belowtime
: Timestamp
The bids
and asks
are formatted like so: [[best price, size at price], [next next best price, size at price], ...]
Updates
After receiving your snapshot, you will be streamed updates (message type
is update
) that have data
fields with:
action
:update
bids
asks
checksum
: see belowtime
: Timestamp
The bids
and asks
fields contain updates to the orderbook.
- If the bid size at price
5220.5
changed to20.2
, thebids
field would be:[[5220.5, 20.2]]
- If all asks at price
5223.5
got canceled, theasks
field would contain:[[5233.5, 0]]
Checksum
Every message contains an unsigned 32-bit integer checksum
of the orderbook. You can run the same checksum
on your client orderbook state and compare it to checksum
field. If they are the same, your client's state is correct. If not, you have likely lost or mishandled a packet and should re-subscribe to receive the initial snapshot.
The checksum operates on a string that represents the first 100 orders on the orderbook on either side. The format of the string is:
<best_bid_price>:<best_bid_size>:<best_ask_price>:<best_ask_size>:<second_best_bid_price>:<second_best_bid_size>:...
For example, if the orderbook was comprised of the following two bids and asks, the string would be '5000.5:10:5001.0:6:4995.0:5:5002.0:7'
:
- bids:
[[5000.5, 10], [4995.0, 5]]
- asks:
[[5001.0, 6], [5002.0, 7]]
If there are more orders on one side of the book than the other, then simply omit the information about orders that don't exist: '5000.5:10.0:5001.0:7.5e-07:4995.0:5
.0'
:
- bids:
[[5000.5, 10.0], [4995.0, 5.0]]
- asks:
[[5001.0, 7.5e-5]]
Rules for float formatting for the checksum:
- Values smaller than 1e-04 (0.0001) should be formatted using scientific notation, and should contain zeroes before the exponent. For example, a message containing
7.5e-5
or0.000075
should be formatted like so for computing the checksum:'7.5e-05'
. - Values larger than 1e-04 should always contain a decimal and at least one digit after the decimal. For instance, a value of
1.0
must be formatted as'1.0'
, not'1'
.
The final checksum is the crc32
value of this string.
Private Channels
Authentication
You can log in by sending a message like so %{code}
{
"args": {
"key": "<api_key>",
"sign": "<signature>",
"time": "<ts>"
},
"op": "login"
}
key
: your API keytime
: integer current timestamp (in milliseconds)sign
: SHA256 HMAC of the following string, using your API secret:<time>websocket_login
subaccount
: (optional) subaccount name
As an example, if:
time
:1557246346499
secret
:'Y2QTHI23f23f23jfjas23f23To0RfUwX3H42fvN-'
sign
would be d10b5a67a1a941ae9463a60b285ae845cdeac1b11edc7da9977bef0228b96de9
One websocket connection may be logged in to at most one user. If the connection is already authenticated, further attempts to log in will result in 400s.
Fills
You will receive messages so:
{
"channel": "fills",
"data": {
"fee": 78.05799225,
"feeRate": 0.0014,
"id": 7828307,
"liquidity": "taker",
"market": "BTC/USD",
"orderId": 38065410,
"tradeId": 19129310,
"price": 3723.75,
"side": "buy",
"size": 14.973,
"time": "2019-05-07T16:40:58.358438+00:00",
"type": "order"
},
"type": "update"
}
This channel streams your fills across all markets. You can subscribe to it on an authenticated connection by sending {'op': 'subscribe', 'channel': 'fills'}
.
Orders
You will receive messages so:
{
"channel": "orders",
"data": {
"id": 24852229,
"clientId": null,
"market": "BTC/USD",
"type": "limit",
"side": "buy",
"size": 42353.0,
"price": 0.2977,
"reduceOnly": false,
"ioc": false,
"postOnly": false,
"status": "closed",
"filledSize": 42353.0,
"remainingSize": 0.0,
"avgFillPrice": 0.2978,
"createdAt": "2021-05-02T22:40:07.217963+00:00"
},
"type": "update"
}
This channel streams updates to your orders across all markets. You can subscribe to it on an authenticated connection by sending {'op': 'subscribe', 'channel': 'orders'}
.
FTX Pay
You will receive messages like so:
{
"channel": "ftxpay",
"data": {
"app": app object,
"payment": payment object,
"status": "paid"
},
"type": "update"
}
This channel streams updates for each completed payment and each returned payment. You can subscribe to it on an authenticated connection by sending {'op': 'subscribe', 'channel': 'ftxpay'}
.
The app and payment object formats can be seen here.
FIX API
FIX (Financial Information eXchange) is a standard electronic messaging protocol which can be used to place orders, receive order updates and executions, and cancel orders. Our FIX api is based on the FIX 4.2 specification and modeled after FIX implementations of other popular cryptocurrency exchanges.
You can find sample client code here: https://github.com/ftexchange/ftx
FIX endpoint URL: tcp+ssl://fix.ftx.us:4363
Clients should connect to the endpoint using SSL.
Sequence numbers are reset for each connection. Resend request and sequence reset messages are not supported.
Messages
8=FIX.4.2|9=162|35=A|49=zyfvB4QPg0A3kkVgqUE9V1fOA-Y6jhdG3seqIIZx|56=FTXUS
All messages should include the following header:
This documentation uses | to represent the FIX field separator (byte 0x01). It should be replaced by 0x01 in actual messages.
Tag | Name | Example | Description |
---|---|---|---|
8 | BeginString | FIX.4.2 | Must be set to "FIX.4.2" |
9 | BodyLength | 162 | Length of the message body in bytes |
35 | MsgType | 8 | Message type |
49 | SenderCompID | zyfvB4QPg0A3kkVgqUE9V1fOA-Y6jhdG3seqIIZx | Client API key (for messages from the client) |
56 | TargetCompID | FTXUS | Must be set to "FTXUS" (for messages from the client) |
34=1|52=20190525-07:17:48
Messages should also include a sequence number MsgSeqNum (34) and a timestamp SendingTime (52). Sequence numbers start at 1 and must be incremented with every message. Messages with duplicate or out-of-order sequence numbers will be rejected. Sequence numbers are reset on new connections.
Logon (A)
Sent by the client to initiate a FIX session. Must be the first message sent after a connection is established. Only one session can be established per connection; additional Logon messages are rejected.
Request
8=FIX.4.2|9=162|35=A|49=zyfvB4QPg0A3kkVgqUE9V1fOA-Y6jhdG3seqIIZx|56=FTXUS|34=1|52=20190525-07:51:51|98=0|108=30|96=8f7e7d37f8033ad249c1833687c230b6f4663f0dd72752899776bab9aa064783|10=237|
Tag | Name | Example | Description |
---|---|---|---|
35 | MsgType | A | |
98 | EncryptMethod | 0 | Must be set to "0" (None) |
108 | HeartBInt | 30 | Must be set to "30" |
96 | RawData | 8f7e...4783 | Signature (see below) |
8013 | CancelOrdersOnDisconnect | Y | "Y": all account orders will be cancelled at the end of the session. "S": all orders placed during the session will be cancelled at the end of the session. Default: no orders will be cancelled. |
1 | Account | "my_subaccount" | Optional subaccount name; can be omitted if authenticating for main account |
Signature
from datetime import datetime
import hmac
api_key = 'YOUR_API_KEY'
api_secret = 'YOUR_API_SECRET'
sending_time = datetime.now().strftime('%Y%m%d-%H:%M:%S')
sign_target = '\x01'.join([
sending_time, # SendingTime
'A', # MsgType
'1', # MsgSeqNum
api_key, # SenderCompID
'FTXUS', # TargetCompID
])
signature = hmac.new(api_secret.encode(), sign_target.encode(), 'sha256').hexdigest()
let crypto = require('crypto');
let apiKey = 'YOUR_API_KEY';
let apiSecret = 'YOUR_API_SECRET';
let sendingTime = '20190525-07:51:51';
let signTarget = [
sendingTime, // SendingTime
'A', // MsgType
'1', // MsgSeqNum
apiKey, // SenderCompID
'FTXUS', // TargetCompID
].join('\x01');
let hmac = crypto.createHmac('sha256', apiSecret);
let signature = hmac.update(signTarget).digest('hex');
For security, the Logon message must be signed by the client. To compute the signature, concatenate the following fields, joined by the FIX field separator (byte 0x01), and compute the SHA256 HMAC using the API secret:
- SendingTime (52)
- MsgType (35)
- MsgSeqNum (34)
- SenderCompID (49)
- TargetCompID (56)
The resulting hash should be hex-encoded.
Response
8=FIX.4.2|9=98|35=A|49=FTXUS|56=zyfvB4QPg0A3kkVgqUE9V1fOA-Y6jhdG3seqIIZx|34=1|98=0|108=30|52=20190525-07:51:51.838|10=099
Tag | Name | Value |
---|---|---|
35 | MsgType | A |
98 | EncryptMethod | 0 |
108 | HeartBInt | 30 |
Heartbeat (0)
Sent by either side if a message has not been received in the past 30 seconds. Should also be sent in response to a TestRequest (1).
8=FIX.4.2|9=86|35=1|49=zyfvB4QPg0A3kkVgqUE9V1fOA-Y6jhdG3seqIIZx|56=FTXUS|34=2|52=20190525-07:52:24.029|10=049|
Tag | Name | Value | Description |
---|---|---|---|
35 | MsgType | 0 | |
112 | TestReqID | 123 | If this heartbeat is in response to a TestRequest, copied from the TestRequest. |
Test Request (1)
May be sent by either side at any time.
8=FIX.4.2|9=112|35=1|49=zyfvB4QPg0A3kkVgqUE9V1fOA-Y6jhdG3seqIIZx|56=FTXUS|34=3|112=20190525-08:26:38.989|52=20190525-08:26:38.989|10=140|
Tag | Name | Value | Description |
---|---|---|---|
35 | MsgType | 1 | |
112 | TestReqID | 123 | Arbitrary string, to be echoed back by a Heartbeat. |
Logout (5)
Sent by either side to terminate the session. The other side should respond with another Logout message to acknowledge session termination. The connection will be closed afterwards.
Tag | Name | Value |
---|---|---|
35 | MsgType | 5 |
New Order Single (D)
Sent by the client to submit a new order. Only limit orders are currently supported by the FIX API.
Tag | Name | Value | Description |
---|---|---|---|
35 | MsgType | D | |
21 | HandlInst | 1 | Must be set to "1" (AutomatedExecutionNoIntervention) |
11 | ClOrdID | order123 | Arbituary client-selected string to identify the order; must be unique |
55 | Symbol | BTC/USD | Symbol name |
40 | OrdType | 2 | Must be set to "2" (Limit) |
38 | OrderQty | 1.1 | Order size in base units |
44 | Price | 8000 | Limit price |
54 | Side | 1 | "1": buy; "2": sell |
59 | TimeInForce | 1 | Must be set to "1" (Good Till Cancel) or "3" (Immediate or Cancel) |
18 | ExecInst | E | This paramter is optional. "E": reduce only, "6": post only, not supplied: standard |
If the order is accepted, an ExecutionReport (8) with ExecType=A
(Pending New) will be returned.
Otherwise, an ExecutionReport with ExecType=8
(Rejected) will be returned.
Order Cancel Request (F)
Sent by the client to request to cancel an order.
Tag | Name | Value | Description |
---|---|---|---|
35 | MsgType | F | |
37 | OrderID | 123456 | System-assigned order ID of the order |
41 | OrigClOrdID | order123 | Client-assigned order ID of the order |
Only one of OrderID (37) and OrigClOrdID (41) should be provided.
If the order is successfully cancelled, an ExecutionReport (8) with ExecType=6
(Pending Cancel) will be
returned. Otherwise, an OrderCancelReject (9) will be returned.
Order Cancel Reject (9)
Sent by the server to notify the client that an OrderCancelRequest (F) failed.
8=FIX.4.2 9=124 35=9 49=FTXUS 56=**** 34=129484 52=20210908-07:18:48.023 434=1 102=0 41=cancel123 10=191
Tag | Name | Value | Description |
---|---|---|---|
35 | MsgType | 9 | |
11 | ClOrdID | cancel123 | Copied from OrderCancelRequest |
37 | OrderID | 123456 | Copied from OrderCancelRequest |
41 | OrigClOrdID | order123 | Copied from OrderCancelRequest |
39 | OrdStatus | 4 | "4" (Canceled) if the order was already cancelled |
102 | CxlRejReason | 1 | "0": order already cancelled, "1": unknown order |
434 | CxlRejResponseTo | 1 | Always set to "1" |
Mass Order Cancel Request (q)
Sent by the server in response to a Mass Order Cancel Request (q)
Tag | Name | Value | Description |
---|---|---|---|
35 | MsgType | q | |
530 | MassCancelRequestType | 7 | 7 for cancelling all orders on all markets, 1 for cancelling all orders on a specific market |
11 | ClOrdID | order123 | optional; client-assigned ID for mass order cancellation request |
55 | Symbol | BTC/USD | optional; symbol name. This field is is required if MassCancelRequestType is set to 1, and ignored otherwise |
A Mass Order Cancel Report (r) will be returned to the client.
Mass Order Cancel Report (r)
Sent by the server in response to a Mass Order Cancel Request (q)
Tag | Name | Value | Description |
---|---|---|---|
35 | MsgType | r | |
530 | MassCancelRequestType | 7 | the MassCancelRequestType of the corresponding Mass Order Cancel Request |
11 | ClOrdID | order123 | optional; the ClOrdID of the corresponding Mass Order Cancel Request. Omitted if no ClOrdID was supplied. |
531 | MassCancelResponse | 0 if the request was rejected, otherwise set to the MassCancelRequestType of the corresponding Mass Order Cancel Request | |
532 | MssCancelRejectReason | optional; 0 if the market specified in the Mass Order Cancel Request was unknown |
Order Status Request (H)
Sent by the client to request the status of an order.
Tag | Name | Value | Description |
---|---|---|---|
35 | MsgType | H | |
37 | OrderID | 123456 | OrderID of the order to request, or "*" to request all pending orders |
41 | OrigClOrdID | order123 | Client-assigned order ID of the order |
20000 | IncludeFillInfo | N | If Y, server will include fill info |
The server will respond with an ExecutionReport (8) with ExecType=I
(OrderStatus) with the
requested order or orders. Only one of OrderID (37) and OrigClOrdID (41) should be provided.
When there are no open orders, the server will include Text (58) of "No open orders".
Additional fields included with IncludeFillInfo (20000=Y):
Tag | Name | Value | Description |
---|---|---|---|
1362 | NoFills | 1 | Number of fills for this order |
The following fields are included zero or more times, once for each fill:
Tag | Name | Value | Description |
---|---|---|---|
1363 | FillExecID | 23436 | Fill ID |
1364 | FillPx | 10.1 | Fill price |
1365 | FillQty | 6.32 | Fill quantity |
1366 | FillTradeID | 101293 | Fill trade ID. This will be shared by the fill corresponding to the other side of the trade. |
1367 | FillTime | 20200219-08:33:26.513 | Fill time |
1443 | FillLiquidityInd | 2 | 1 for maker, 2 for taker |
20100 | FeeRate | 0.0007 | Fees paid on the fill, in percent |
20101 | Fee | 0.0446824 | Fees paid on the fill, in USD |
Execution Report (8)
Sent by the server whenever an order receives a fill, whenever the status of an order changes, or in response to a NewOrderSingle (D), OrderCancelRequest (F), or OrderStatusRequest (H) message from the client.
pending order (order ack):
8=FIX.4.2 9=251 35=8 49=FTXUS 56=**** 34=1039761 52=20210520-15:23:31.323 150=A 17=0e71c26d-9b3d-42f1-9760-c74a9459a841 37=501249457 11=order123 55=BTC/USD 38=0.98 44=35593.0 54=2 39=A 14=0 151=0.98000000 6=0 10=026
new order:
8=FIX.4.2 9=261 35=8 49=FTXUS 56=**** 34=1063736 52=20210520-12:41:43.416 150=0 17=bbf0ac39-91e4-47bd-aacf-f2ff356c6891 60=20210520-16:46:47.411 37=501249457 11=order123 55=BTC/USD 38=0.98 44=35593.0 54=1 39=0 14=0.0 151=0.98 6=0 10=081
fill for order:
8=FIX.4.2 9=272 35=8 49=FTXUS 56=**** 34=403622 52=20210520-12:41:46.134 150=1 17=370905178 60=20210520-12:41:46.104 37=501249457 11=order123 55=BTC/USD 38=.7270 44=35593.0 54=2 39=1 14=0.08 151=0.9 6=35591.0 31=35591.0 32=0.08 1366=184114783 1057=N 12=-1.0016660525 13=3 10=233
fully filled/done:
8=FIX.4.2 9=261 35=8 49=FTXUS 56=**** 34=20 52=20210520-12:41:47.123 150=3 17=c9c8a56e-2159-445e-bb9d-acfeede977b2 60=20210520-12:41:47.112 37=501249457 11=order123 55=BTC/USD 38=0.98 44=35593.0 54=2 39=3 14=0.98 151=0.0 6=35593.0 10=125
pending cancel:
8=FIX.4.2 9=251 35=8 49=FTXUS 56=**** 34=1063738 52=20210520-12:41:43.434 150=6 17=5f18f089-a9bc-414a-b0c2-452642e670c7 37=5012978452 11=order456 55=BTC/USD 38=0.94000000 44=34933.0 54=1 39=6 14=0 151=0.94000000 6=0 10=055
Tag | Name | Value | Description |
---|---|---|---|
35 | MsgType | 8 | |
11 | ClOrdID | order123 | Client-selected order ID. |
37 | OrderID | 123456 | Server-assigned order ID |
17 | ExecID | d840c87b-ad98-47b1-95d3-4d41950fa776 | unique execution ID. Equal to Fill ID if this message was the result of a fill |
55 | Symbol | BTC/SD | Symbol name |
54 | Side | 1 | "1": buy; "2": sell |
38 | OrderQty | 1.2 | Original order quantity |
44 | Price | 8000 | Original order price |
150 | ExecType | 1 | Reason for this message (see below) |
39 | OrdStatus | 0 | Order status (see below) |
14 | CumQty | 0.4 | Quantity of order that has already been filled |
151 | LeavesQty | 0.8 | Quantity of order that is still open |
84 | CxlQty | 0.0 | Quantity cancelled by self-trade prevention. Only present if the cancelled quantity is greater than zero |
60 | TransactTime | 20190525-08:26:38.989 | Time of the order update. Only present on order updates |
31 | LastPx | 7999.25 | Fill price. Only present if this message was the result of a fill |
32 | LastQty | 0.4 | Fill quantity. Only present if this message was the result of a fill |
1057 | AggressorIndicator | Y | "Y": taker fill; "N": maker fill. Only present if this message was the result of a fill |
1366 | FillTradeID | 101293 | Fill trade ID. Only present if this message was the result of a fill |
6 | AvgPx | 7999.25 | Average fill price for all fills in order. Only present if this message was the result of a fill |
12 | Commission | 0.0067307233000000 | Fee for trade, reported in USD. Only present if this message was the result of a fill |
13 | CommType | 3 | Always 3 (absolute) |
103 | OrdRejReason | 3 | Reason the order was rejected (see below). Only present on rejected NewOrderSingle (D) requests |
58 | Text | 58 | Description of the reason the order was rejected (e.g., Too many requests). Only present on rejected NewOrderSingle (D) requests |
ExecType values
The ExecType (150) field indicates the reason why this ExecutionReport was sent.
ExecType | Description |
---|---|
0 | New order |
1 | New fill for order |
3 | Order done (fully filled) |
4 | Order cancelled |
5 | Order resized (possible for reduce-only orders) |
A | Response to a successful NewOrderSingle (D) request |
8 | Response to a rejected NewOrderSingle (D) request |
6 | Response to a successful OrderCancelRequest (F) request |
I | Response to a OrderStatusRequest (H) request |
Note that every fill will generate a new ExecType=1
message. If a fill causes an order to be fully
filled, both a ExecType=1
message and a ExecType=3
message will be generated.
Similarly, a newly placed order that is immediately matched against an opposing order will generate
both a ExecType=0
message and a ExecType=1
message.
OrdStatus values
OrdStatus | Description |
---|---|
A | Pending order |
0 | New order |
1 | Partially filled order |
3 | Fully filled order |
4 | Cancelled order |
5 | Resized order |
6 | Pending cancel |
OrdRejReason values
OrdRejReason | Description |
---|---|
3 | Risk limits exceeded |
99 | Too many requests |
0 | Other errors |
Reject (3)
Sent by the server in response to an invalid message.
Tag | Name | Value | Description |
---|---|---|---|
35 | MsgType | 3 | |
45 | RefSeqNum | 2 | Sequence number of the rejected message |
371 | RefTagID | 38 | Tag number of the rejected field |
372 | RefMsgType | D | Message type of the rejected message |
58 | Text | Missing quantity | Human-readable description of the reason for the rejection |
373 | SessionRejectReason | 1 | Code to identify the rejection reason (see below) |
Rejection reason codes
SessionRejectReason | Description |
---|---|
1 | Required tag missing |
5 | Value incorrect for this tag |
6 | Incorrect data format for value |
11 | Invalid MsgType |