API Documentation

General Info

General API Information

  • Some endpoints will require an API Key. Please refer to this page
  • The base endpoint is: https://fapi.apollox.finance
  • All endpoints return either a JSON object or array.
  • Data is returned in ascending order. Oldest first, newest last.
  • All time and timestamp related fields are in milliseconds.
  • All data types adopt definition in JAVA.

HTTP Return Codes

  • HTTP 4XX return codes are used for for malformed requests; the issue is on the sender's side.
  • HTTP 403 return code is used when the WAF Limit (Web Application Firewall) has been violated.
  • HTTP 429 return code is used when breaking a request rate limit.
  • HTTP 418 return code is used when an IP has been auto-banned for continuing to send requests after receiving 429 codes.
  • HTTP 5XX return codes are used for internal errors; the issue is on ApolloX's side.
  • HTTP 503 return code is used when the API successfully sent the message but not get a response within the timeout period. It is important to NOT treat this as a failure operation; the execution status is UNKNOWN and could have been a success.

Error Codes and Messages

  • Any endpoint can return an ERROR
The error payload is as follows:
1
{
2
"code": -1121,
3
"msg": "Invalid symbol."
4
}
Copied!
  • Specific error codes and messages defined in Error Codes.

General Information on Endpoints

  • For GET endpoints, parameters must be sent as a query string.
  • For POST, PUT, and DELETE endpoints, the parameters may be sent as a query string or in the request body with content type application/x-www-form-urlencoded. You may mix parameters between both the query string and request body if you wish to do so.
  • Parameters may be sent in any order.
  • If a parameter sent in both the query string and request body, the query string parameter will be used.

LIMITS

  • The /fapi/v1/exchangeInfo rateLimits array contains objects related to the exchange's RAW_REQUEST, REQUEST_WEIGHT, and ORDER rate limits. These are further defined in the ENUM definitions section under Rate limiters (rateLimitType).
  • A 429 will be returned when either rate limit is violated.
ApolloX Finance has the right to further tighten the rate limits on users with intent to attack.

IP Limits

  • Every request will contain X-MBX-USED-WEIGHT-(intervalNum)(intervalLetter) in the response headers which has the current used weight for the IP for all request rate limiters defined.
  • Each route has a weight which determines for the number of requests each endpoint counts for. Heavier endpoints and endpoints that do operations on multiple symbols will have a heavier weight.
  • When a 429 is received, it's your obligation as an API to back off and not spam the API.
  • Repeatedly violating rate limits and/or failing to back off after receiving 429s will result in an automated IP ban (HTTP status 418).
  • IP bans are tracked and scale in duration for repeat offenders, from 2 minutes to 3 days.
  • The limits on the API are based on the IPs, not the API keys.
It is strongly recommended to use websocket stream for getting data as much as possible, which can not only ensure the timeliness of the message, but also reduce the access restriction pressure caused by the request.

Order Rate Limits

  • Every order response will contain a X-MBX-ORDER-COUNT-(intervalNum)(intervalLetter) header which has the current order count for the account for all order rate limiters defined.
  • Rejected/unsuccessful orders are not guaranteed to have X-MBX-ORDER-COUNT-** headers in the response.
  • The order rate limit is counted against each account.

Endpoint Security Type

  • Each endpoint has a security type that determines the how you will interact with it.
  • API-keys are passed into the Rest API via the X-MBX-APIKEY header.
  • API-keys and secret-keys are case sensitive.
  • API-keys can be configured to only access certain types of secure endpoints. For example, one API-key could be used for TRADE only, while another API-key can access everything except for TRADE routes.
  • By default, API-keys can access all secure routes.
Security Type
Description
NONE
Endpoint can be accessed freely.
TRADE
Endpoint requires sending a valid API-Key and signature.
USER_DATA
Endpoint requires sending a valid API-Key and signature.
USER_STREAM
Endpoint requires sending a valid API-Key.
MARKET_DATA
Endpoint requires sending a valid API-Key.
  • TRADE and USER_DATA endpoints are SIGNED endpoints.

SIGNED (TRADE and USER_DATA) Endpoint Security

  • SIGNED endpoints require an additional parameter, signature, to be sent in the query string or request body.
  • Endpoints use HMAC SHA256 signatures. The HMAC SHA256 signature is a keyed HMAC SHA256 operation. Use your secretKey as the key and totalParams as the value for the HMAC operation.
  • The signature is not case sensitive.
  • Please make sure the signature is the end part of your query string or request body.
  • totalParams is defined as the query string concatenated with the request body.

Timing Security

  • A SIGNED endpoint also requires a parameter, timestamp, to be sent which should be the millisecond timestamp of when the request was created and sent.
  • An additional parameter, recvWindow, may be sent to specify the number of milliseconds after timestamp the request is valid for. If recvWindow is not sent, it defaults to 5000.
The logic is as follows:
1
if (timestamp < (serverTime + 1000) && (serverTime - timestamp) <= recvWindow){
2
// process request
3
}
4
else {
5
// reject request
6
}
Copied!
Serious trading is about timing. Networks can be unstable and unreliable, which can lead to requests taking varying amounts of time to reach the servers. With recvWindow, you can specify that the request must be processed within a certain number of milliseconds or be rejected by the server.
It is recommended to use a small recvWindow of 5000 or less!

SIGNED Endpoint Examples for POST /fapi/v1/order

Here is a step-by-step example of how to send a vaild signed payload from the Linux command line using echo, openssl, and curl.
Key
Value
apiKey
dbefbc809e3e83c283a984c3a1459732ea7db1360ca80c5c2c8867408d28cc83
secretKey
2b5eb11e18796d12d88f13dc27dbbd02c2cc51ff7059765ed9821957d82bb4d9
Parameter
Value
symbol
BTCUSDT
side
BUY
type
LIMIT
timeInForce
GTC
quantity
1
price
9000
recvWindow
5000
timestamp
1591702613943
Example 1: As a query string
Example 1
HMAC SHA256 signature:
1
$ echo -n "symbol=BTCUSDT&side=BUY&type=LIMIT&quantity=1&price=9000&timeInForce=GTC&recvWindow=5000&timestamp=1591702613943" | openssl dgst -sha256 -hmac "2b5eb11e18796d12d88f13dc27dbbd02c2cc51ff7059765ed9821957d82bb4d9"
2
(stdin)= 3c661234138461fcc7a7d8746c6558c9842d4e10870d2ecbedf7777cad694af9
Copied!
curl command:
1
(HMAC SHA256)
2
$ curl -H "X-MBX-APIKEY: dbefbc809e3e83c283a984c3a1459732ea7db1360ca80c5c2c8867408d28cc83" -X POST 'https://fapi/apollox.finance/fapi/v1/order?symbol=BTCUSDT&side=BUY&type=LIMIT&quantity=1&price=9000&timeInForce=GTC&recvWindow=5000&timestamp=1591702613943&signature= 3c661234138461fcc7a7d8746c6558c9842d4e10870d2ecbedf7777cad694af9'
Copied!
  • queryString:
    symbol=BTCUSDT &side=BUY &type=LIMIT &timeInForce=GTC &quantity=1 &price=9000 &recvWindow=5000 &timestamp=1591702613943
Example 2: As a request body
Example 2
HMAC SHA256 signature:
1
$ echo -n "symbol=BTCUSDT&side=BUY&type=LIMIT&quantity=1&price=9000&timeInForce=GTC&recvWindow=5000&timestamp=1591702613943" | openssl dgst -sha256 -hmac "2b5eb11e18796d12d88f13dc27dbbd02c2cc51ff7059765ed9821957d82bb4d9"
2
(stdin)= 3c661234138461fcc7a7d8746c6558c9842d4e10870d2ecbedf7777cad694af9
Copied!
curl command:
1
(HMAC SHA256)
2
$ curl -H "X-MBX-APIKEY: dbefbc809e3e83c283a984c3a1459732ea7db1360ca80c5c2c8867408d28cc83" -X POST 'https://fapi/apollox.finance/fapi/v1/order' -d 'symbol=BTCUSDT&side=BUY&type=LIMIT&quantity=1&price=9000&timeInForce=GTC&recvWindow=5000&timestamp=1591702613943&signature= 3c661234138461fcc7a7d8746c6558c9842d4e10870d2ecbedf7777cad694af9'
Copied!
  • requestBody:
    symbol=BTCUSDT &side=BUY &type=LIMIT &timeInForce=GTC &quantity=1 &price=9000 &recvWindow=5000 &timestamp=1591702613943
Example 3: Mixed query string and request body
Example 3
HMAC SHA256 signature:
1
$ echo -n "symbol=BTCUSDT&side=BUY&type=LIMIT&quantity=1&price=9000&timeInForce=GTC&recvWindow=5000&timestamp=1591702613943" | openssl dgst -sha256 -hmac "2b5eb11e18796d12d88f13dc27dbbd02c2cc51ff7059765ed9821957d82bb4d9"
2
(stdin)= 3c661234138461fcc7a7d8746c6558c9842d4e10870d2ecbedf7777cad694af9
Copied!
curl command:
1
(HMAC SHA256)
2
$ curl -H "X-MBX-APIKEY: dbefbc809e3e83c283a984c3a1459732ea7db1360ca80c5c2c8867408d28cc83" -X POST 'https://fapi/apollox.finance/fapi/v1/order?symbol=BTCUSDT&side=BUY&type=LIMIT&timeInForce=GTC' -d 'quantity=1&price=9000&recvWindow=5000&timestamp=1591702613943&signature=3c661234138461fcc7a7d8746c6558c9842d4e10870d2ecbedf7777cad694af9'
Copied!
  • queryString: symbol=BTCUSDT&side=BUY&type=LIMIT&timeInForce=GTC
  • requestBody: quantity=1&price=9000&recvWindow=5000&timestamp= 1591702613943
Note that the signature is different in example 3. There is no & between "GTC" and "quantity=1".

Public Endpoints Info

Terminology

  • base asset refers to the asset that is the quantity of a symbol.
  • quote asset refers to the asset that is the price of a symbol.

ENUM definitions

Symbol type:
  • FUTURE
Contract type (contractType):
  • PERPETUAL
Contract status(contractStatus,status):
  • PENDING_TRADING
  • TRADING
  • PRE_SETTLE
  • SETTLING
  • CLOSE
Order status (status):
  • NEW
  • PARTIALLY_FILLED
  • FILLED
  • CANCELED
  • REJECTED
  • EXPIRED
Order types (orderTypes, type):
  • LIMIT
  • MARKET
  • STOP
  • STOP_MARKET
  • TAKE_PROFIT
  • TAKE_PROFIT_MARKET
  • TRAILING_STOP_MARKET
Order side (side):
  • BUY
  • SELL
Position side (positionSide):
  • BOTH
  • LONG
  • SHORT
Time in force (timeInForce):
  • GTC - Good Till Cancel
  • IOC - Immediate or Cancel
  • FOK - Fill or Kill
  • GTX - Good Till Crossing (Post Only)
Working Type (workingType)
  • MARK_PRICE
  • CONTRACT_PRICE
Response Type (newOrderRespType)
  • ACK
  • RESULT
Kline/Candlestick chart intervals:
m -> minutes; h -> hours; d -> days; w -> weeks; M -> months
  • 1m
  • 3m
  • 5m
  • 15m
  • 30m
  • 1h
  • 2h
  • 4h
  • 6h
  • 8h
  • 12h
  • 1d
  • 3d
  • 1w
  • 1M
Rate limiters (rateLimitType)
REQUEST_WEIGHT
1
{
2
"rateLimitType": "REQUEST_WEIGHT",
3
"interval": "MINUTE",
4
"intervalNum": 1,
5
"limit": 2400
6
}
Copied!
ORDERS
1
{
2
"rateLimitType": "ORDERS",
3
"interval": "MINUTE",
4
"intervalNum": 1,
5
"limit": 1200
6
}
Copied!
  • REQUEST_WEIGHT
  • ORDERS
Rate limit intervals (interval)
  • MINUTE

Filters

Filters define trading rules on a symbol or an exchange.

Symbol filters

PRICE_FILTER
/exchangeInfo format:
1
{
2
"filterType": "PRICE_FILTER",
3
"minPrice": "0.00000100",
4
"maxPrice": "100000.00000000",
5
"tickSize": "0.00000100"
6
}
Copied!
The PRICE_FILTER defines the price rules for a symbol. There are 3 parts:
  • minPrice defines the minimum price/stopPrice allowed; disabled on minPrice == 0.
  • maxPrice defines the maximum price/stopPrice allowed; disabled on maxPrice == 0.
  • tickSize defines the intervals that a price/stopPrice can be increased/decreased by; disabled on tickSize == 0.
Any of the above variables can be set to 0, which disables that rule in the price filter. In order to pass the price filter, the following must be true for price/stopPrice of the enabled rules:
  • price >= minPrice
  • price <= maxPrice
  • (price-minPrice) % tickSize == 0
LOT_SIZE
/exchangeInfo format:
1
{
2
"filterType": "LOT_SIZE",
3
"minQty": "0.00100000",
4
"maxQty": "100000.00000000",
5
"stepSize": "0.00100000"
6
}
Copied!
The LOT_SIZE filter defines the quantity (aka "lots" in auction terms) rules for a symbol. There are 3 parts:
  • minQty defines the minimum quantity allowed.
  • maxQty defines the maximum quantity allowed.
  • stepSize defines the intervals that a quantity can be increased/decreased by.
In order to pass the lot size, the following must be true for quantity:
  • quantity >= minQty
  • quantity <= maxQty
  • (quantity-minQty) % stepSize == 0
MARKET_LOT_SIZE
/exchangeInfo format:
1
{
2
"filterType": "MARKET_LOT_SIZE",
3
"minQty": "0.00100000",
4
"maxQty": "100000.00000000",
5
"stepSize": "0.00100000"
6
}
Copied!
The MARKET_LOT_SIZE filter defines the quantity (aka "lots" in auction terms) rules for MARKET orders on a symbol. There are 3 parts:
  • minQty defines the minimum quantity allowed.
  • maxQty defines the maximum quantity allowed.
  • stepSize defines the intervals that a quantity can be increased/decreased by.
In order to pass the market lot size, the following must be true for quantity:
  • quantity >= minQty
  • quantity <= maxQty
  • (quantity-minQty) % stepSize == 0
MAX_NUM_ORDERS
/exchangeInfo format:
1
{
2
"filterType": "MAX_NUM_ORDERS",
3
"limit": 200
4
}
Copied!
The MAX_NUM_ORDERS filter defines the maximum number of orders an account is allowed to have open on a symbol.
Note that both "algo" orders and normal orders are counted for this filter.
MAX_NUM_ALGO_ORDERS
/exchangeInfo format:
1
{
2
"filterType": "MAX_NUM_ALGO_ORDERS",
3
"limit": 100
4
}
Copied!
The MAX_NUM_ALGO_ORDERS filter defines the maximum number of all kinds of algo orders an account is allowed to have open on a symbol.
The algo orders include STOP, STOP_MARKET, TAKE_PROFIT, TAKE_PROFIT_MARKET, and TRAILING_STOP_MARKET orders.
PERCENT_PRICE
/exchangeInfo format:
1
{
2
"filterType": "PERCENT_PRICE",
3
"multiplierUp": "1.1500",
4
"multiplierDown": "0.8500",
5
"multiplierDecimal": 4
6
}
Copied!
The PERCENT_PRICE filter defines valid range for a price based on the mark price.
In order to pass the percent price, the following must be true for price:
  • BUY: price <= markPrice * multiplierUp
  • SELL: price >= markPrice * multiplierDown
MIN_NOTIONAL
/exchangeInfo format:
1
{
2
"filterType": "MIN_NOTIONAL",
3
"notional": "1"
4
}
Copied!
The MIN_NOTIONAL filter defines the minimum notional value allowed for an order on a symbol. An order's notional value is the price * quantity. Since MARKET orders have no price, the mark price is used.

Market Data Endpoints

Test Connectivity

Response:
1
{}
Copied!
GET /fapi/v1/ping
Test connectivity to the Rest API.
Weight: 1
Parameters: NONE

Check Server Time

Response:
1
{
2
"serverTime": 1499827319559
3
}
Copied!
GET /fapi/v1/time
Test connectivity to the Rest API and get the current server time.
Weight: 1
Parameters: NONE

Exchange Information

Response:
1
{
2
"exchangeFilters": [],
3
"rateLimits": [
4
{
5
"interval": "MINUTE",
6
"intervalNum": 1,
7
"limit": 2400,
8
"rateLimitType": "REQUEST_WEIGHT"
9
},
10
{
11
"interval": "MINUTE",
12
"intervalNum": 1,
13
"limit": 1200,
14
"rateLimitType": "ORDERS"
15
}
16
],
17
"serverTime": 1565613908500, // Ignore please. If you want to check current server time, please check via "GET /fapi/v1/time"
18
"assets": [ // assets information
19
{
20
"asset": "BUSD",
21
"marginAvailable": true, // whether the asset can be used as margin in Multi-Assets mode
22
"autoAssetExchange": 0 // auto-exchange threshold in Multi-Assets margin mode
23
},
24
{
25
"asset": "USDT",
26
"marginAvailable": true,
27
"autoAssetExchange": 0
28
},
29
{
30
"asset": "BTC",
31
"marginAvailable": false,
32
"autoAssetExchange": null
33
}
34
],
35
"symbols": [
36
{
37
"symbol": "DOGEUSDT",
38
"pair": "DOGEUSDT",
39
"contractType": "PERPETUAL",
40
"deliveryDate": 4133404800000,
41
"onboardDate": 1598252400000,
42
"status": "TRADING",
43
"maintMarginPercent": "2.5000", // ignore
44
"requiredMarginPercent": "5.0000", // ignore
45
"baseAsset": "BLZ",
46
"quoteAsset": "USDT",
47
"marginAsset": "USDT",
48
"pricePrecision": 5, // please do not use it as tickSize
49
"quantityPrecision": 0, // please do not use it as stepSize
50
"baseAssetPrecision": 8,
51
"quotePrecision": 8,
52
"underlyingType": "COIN",
53
"underlyingSubType": ["STORAGE"],
54
"settlePlan": 0,
55
"triggerProtect": "0.15", // threshold for algo order with "priceProtect"
56
"filters": [
57
{
58
"filterType": "PRICE_FILTER",
59
"maxPrice": "300",
60
"minPrice": "0.0001",
61
"tickSize": "0.0001"
62
},
63
{
64
"filterType": "LOT_SIZE",
65
"maxQty": "10000000",
66
"minQty": "1",
67
"stepSize": "1"
68
},
69
{
70
"filterType": "MARKET_LOT_SIZE",
71
"maxQty": "590119",
72
"minQty": "1",
73
"stepSize": "1"
74
},
75
{
76
"filterType": "MAX_NUM_ORDERS",
77
"limit": 200
78
},
79
{
80
"filterType": "MAX_NUM_ALGO_ORDERS",
81
"limit": 100
82
},
83
{
84
"filterType": "MIN_NOTIONAL",
85
"notional": "1",
86
},
87
{
88
"filterType": "PERCENT_PRICE",
89
"multiplierUp": "1.1500",
90
"multiplierDown": "0.8500",
91
"multiplierDecimal": 4
92
}
93
],
94
"OrderType": [
95
"LIMIT",
96
"MARKET",
97
"STOP",
98
"STOP_MARKET",
99
"TAKE_PROFIT",
100
"TAKE_PROFIT_MARKET",
101
"TRAILING_STOP_MARKET"
102
],
103
"timeInForce": [
104
"GTC",
105
"IOC",
106
"FOK",
107
"GTX"
108
],
109
"liquidationFee": "0.010000", // liquidation fee rate
110
"marketTakeBound": "0.30", // the max price difference rate( from mark price) a market order can make
111
}
112
],
113
"timezone": "UTC"
114
}
Copied!
GET /fapi/v1/exchangeInfo
Current exchange trading rules and symbol information
Weight: 1
Parameters: NONE

Order Book

Response:
1
{
2
"lastUpdateId": 1027024,
3
"E": 1589436922972, // Message output time
4
"T": 1589436922959, // Transaction time
5
"bids": [
6
[
7
"4.00000000", // PRICE
8
"431.00000000" // QTY
9
]
10
],
11
"asks": [
12
[
13
"4.00000200",
14
"12.00000000"
15
]
16
]
17
}
Copied!
GET /fapi/v1/depth
Weight:
Adjusted based on the limit:
Limit
Weight
5, 10, 20, 50
2
100
5
500
10
1000
20
Parameters:
Name
Type
Mandatory
Description
symbol
STRING
YES
limit
INT
NO
Default 500; Valid limits:[5, 10, 20, 50, 100, 500, 1000]

Recent Trades List

Response:
1
[
2
{
3
"id": 28457,
4
"price": "4.00000100",
5
"qty": "12.00000000",
6
"quoteQty": "48.00",
7
"time": 1499865549590,
8
"isBuyerMaker": true,
9
}
10
]
Copied!
GET /fapi/v1/trades
Get recent market trades
Weight: 1
Parameters:
Name
Type
Mandatory
Description
symbol
STRING
YES
limit
INT
NO
Default 500; max 1000.
  • Market trades means trades filled in the order book. Only market trades will be returned, which means the insurance fund trades and ADL trades won't be returned.

Old Trades Lookup (MARKET_DATA)

Response:
1
[
2
{
3
"id": 28457,
4
"price": "4.00000100",
5
"qty": "12.00000000",
6
"quoteQty": "8000.00",
7
"time": 1499865549590,
8
"isBuyerMaker": true,
9
}
10
]
Copied!
GET /fapi/v1/historicalTrades
Get older market historical trades.
Weight: 20
Parameters:
Name
Type
Mandatory
Description
symbol
STRING
YES
limit
INT
NO
Default 500; max 1000.
fromId
LONG
NO
TradeId to fetch from. Default gets most recent trades.
  • Market trades means trades filled in the order book. Only market trades will be returned, which means the insurance fund trades and ADL trades won't be returned.

Compressed/Aggregate Trades List

Response:
1
[
2
{
3
"a": 26129, // Aggregate tradeId
4
"p": "0.01633102", // Price
5
"q": "4.70443515", // Quantity
6
"f": 27781, // First tradeId
7
"l": 27781, // Last tradeId
8
"T": 1498793709153, // Timestamp
9
"m": true, // Was the buyer the maker?
10
}
11
]
Copied!
GET /fapi/v1/aggTrades
Get compressed, aggregate market trades. Market trades that fill at the time, from the same order, with the same price will have the quantity aggregated.
Weight: 20
Parameters:
Name
Type
Mandatory
Description
symbol
STRING
YES
fromId
LONG
NO
ID to get aggregate trades from INCLUSIVE.
startTime
LONG
NO
Timestamp in ms to get aggregate trades from INCLUSIVE.
endTime
LONG
NO
Timestamp in ms to get aggregate trades until INCLUSIVE.
limit
INT
NO
Default 500; max 1000.
  • If both startTime and endTime are sent, time between startTime and endTime must be less than 1 hour.
  • If fromId, startTime, and endTime are not sent, the most recent aggregate trades will be returned.
  • Only market trades will be aggregated and returned, which means the insurance fund trades and ADL trades won't be aggregated.

Kline/Candlestick Data

Response:
1
[
2
[
3
1499040000000, // Open time
4
"0.01634790", // Open
5
"0.80000000", // High
6
"0.01575800", // Low
7
"0.01577100", // Close
8
"148976.11427815", // Volume
9
1499644799999, // Close time
10
"2434.19055334", // Quote asset volume
11
308, // Number of trades
12
"1756.87402397", // Taker buy base asset volume
13
"28.46694368", // Taker buy quote asset volume
14
"17928899.62484339" // Ignore.
15
]
16
]
Copied!
GET /fapi/v1/klines
Kline/candlestick bars for a symbol. Klines are uniquely identified by their open time.
Weight: based on parameter LIMIT
LIMIT
weight
[1,100)
1
[100, 500)
2
[500, 1000]
5
1000 | 10
Parameters:
Name
Type
Mandatory
Description
symbol
STRING
YES
interval
ENUM
YES
startTime
LONG
NO
endTime
LONG
NO
limit
INT
NO
Default 500; max 1500.
  • If startTime and endTime are not sent, the most recent klines are returned.

Index Price Kline/Candlestick Data

Response:
1
[
2
[
3
1591256400000, // Open time
4
"9653.69440000", // Open
5
"9653.69640000", // High
6
"9651.38600000", // Low
7
"9651.55200000", // Close (or latest price)
8
"0 ", // Ignore
9
1591256459999, // Close time
10
"0", // Ignore
11
60, // Number of bisic data
12
"0", // Ignore
13
"0", // Ignore
14
"0" // Ignore
15
]
16
]
Copied!
GET /fapi/v1/indexPriceKlines
Kline/candlestick bars for the index price of a pair.
Klines are uniquely identified by their open time.
Weight: based on parameter LIMIT
LIMIT
weight
[1,100)
1
[100, 500)
2
[500, 1000]
5
1000 | 10
Parameters:
Name
Type
Mandatory
Description
pair
STRING
YES
interval
ENUM
YES
startTime
LONG
NO
endTime
LONG
NO
limit
INT
NO
Default 500; max 1500.
  • If startTime and endTime are not sent, the most recent klines are returned.

Mark Price Kline/Candlestick Data

Response:
1
[
2
[
3
1591256460000, // Open time
4
"9653.29201333", // Open
5
"9654.56401333", // High
6
"9653.07367333", // Low
7
"9653.07367333", // Close (or latest price)
8
"0 ", // Ignore
9
1591256519999, // Close time
10
"0", // Ignore
11
60, // Number of bisic data
12
"0", // Ignore
13
"0", // Ignore
14
"0" // Ignore
15
]
16
]
Copied!
GET /fapi/v1/markPriceKlines
Kline/candlestick bars for the mark price of a symbol.
Klines are uniquely identified by their open time.
Weight: based on parameter LIMIT
LIMIT
weight
[1,100)
1
[100, 500)
2
[500, 1000]
5
1000 | 10
Parameters:
Name
Type
Mandatory
Description
symbol
STRING
YES
interval
ENUM
YES
startTime
LONG
NO
endTime
LONG
NO
limit
INT
NO
Default 500; max 1500.
  • If startTime and endTime are not sent, the most recent klines are returned.

Mark Price

Response:
1
{
2
"symbol": "BTCUSDT",
3
"markPrice": "11793.63104562", // mark price
4
"indexPrice": "11781.80495970", // index price
5
"estimatedSettlePrice": "11781.16138815", // Estimated Settle Price, only useful in the last hour before the settlement starts.
6
"lastFundingRate": "0.00038246", // This is the lasted funding rate
7
"nextFundingTime": 1597392000000,
8
"interestRate": "0.00010000",
9
"time": 1597370495002
10
}
Copied!