{
"timestamp": 1629350400000, // timestamp in millisecond
"instrument_id": "BTC/USDT:USDT-PERP",
"market_type": "perp", // "spot", "futures", "perp
"last_price": 10000.0, // last price
"raw_data": {} // raw data from exchange
}
get_index_price
This function will return the index price of the instrument. index price is the price of the underlying asset in the perp or futures market.
{
"timestamp": 1629350400000, // timestamp in millisecond
"instrument_id": "BTC/USDT:USDT-PERP",
"market_type": "perp", // "spot", "futures", "perp
"index_price": 10000.0, // last price
"raw_data": {} // raw data from exchange
}
3. `get_mark_price`
This function will return the `mark price` of the instrument. `mark price` is the price of the underlying asset normally used to calculate the `unrealized PNL` of the position.
- input format
```json5
{
"instrument_id": "BTC/USDT:USDT-PERP", // required, funding rate only support futures and perp
}
output format
{
"timestamp": 1629350400000, // timestamp in millisecond
"instrument_id": "BTC/USDT:USDT-PERP",
"market_type": "perp", // "spot", "futures", "perp
"mark_price": 10000.0, // mark price
"raw_data": {} // raw data from exchange
}
Issue purpose:
Sync
okx
,binance
,bybit
,kucoin
,bitget
,htx
,gateio
exchanges'index
,mark
andlast price
related functions output formatSync function
This issue will ensure the above exchange will have the following function and input and output format will consistent with the following format.
get_last_price
This function will return the
last traded price
of the instrument.get_index_price
This function will return the
index price
of the instrument.index price
is the price of the underlying asset in theperp
orfutures
market.Issue Progress
get_index_price
okx
binance
bybit
kucoin
bitget
htx
gateio
get_mark_price
okx
binance
bybit
kucoin
bitget
htx
gateio
get_last_price
okx
binance
bybit
kucoin
bitget
htx
gateio