feat(): add/update missing v5 market endpoints. add api doc examples for each endpoint.
This commit is contained in:
@@ -35,6 +35,7 @@ import {
|
||||
CreateSubMemberParamsV5,
|
||||
CreateSubMemberResultV5,
|
||||
CursorListV5,
|
||||
DeliveryPriceV5,
|
||||
DeliveryRecordV5,
|
||||
DepositAddressResultV5,
|
||||
DepositRecordV5,
|
||||
@@ -50,6 +51,7 @@ import {
|
||||
GetBorrowHistoryParamsV5,
|
||||
GetClosedPnLParamsV5,
|
||||
GetCoinExchangeRecordParamsV5,
|
||||
GetDeliveryPriceParamsV5,
|
||||
GetDeliveryRecordParamsV5,
|
||||
GetDepositRecordParamsV5,
|
||||
GetExecutionListParamsV5,
|
||||
@@ -333,6 +335,8 @@ export class RestClientV5 extends BaseRestClient {
|
||||
* Get the delivery price for option
|
||||
*
|
||||
* Covers: Option
|
||||
*
|
||||
* @deprecated use getDeliveryPrice() instead
|
||||
*/
|
||||
getOptionDeliveryPrice(
|
||||
params: GetOptionDeliveryPriceParamsV5,
|
||||
@@ -342,6 +346,17 @@ export class RestClientV5 extends BaseRestClient {
|
||||
return this.get('/v5/market/delivery-price', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the delivery price of Inverse futures, USDC futures and Options
|
||||
*
|
||||
* Covers: USDC futures / Inverse futures / Option
|
||||
*/
|
||||
getDeliveryPrice(
|
||||
params: GetDeliveryPriceParamsV5,
|
||||
): Promise<APIResponseV3WithTime<CategoryCursorListV5<DeliveryPriceV5[]>>> {
|
||||
return this.get('/v5/market/delivery-price', params);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
****** Trade APIs
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { KlineIntervalV3 } from '../shared';
|
||||
import { CategoryV5, OptionTypeV5 } from '../v5-shared';
|
||||
import { CategoryV5, InstrumentStatusV5, OptionTypeV5 } from '../v5-shared';
|
||||
|
||||
export interface GetKlineParamsV5 {
|
||||
category: 'spot' | 'linear' | 'inverse';
|
||||
@@ -40,6 +40,7 @@ export interface GetPremiumIndexPriceKlineParamsV5 {
|
||||
export interface GetInstrumentsInfoParamsV5 {
|
||||
category: CategoryV5;
|
||||
symbol?: string;
|
||||
status?: InstrumentStatusV5;
|
||||
baseCoin?: string;
|
||||
limit?: number;
|
||||
cursor?: string;
|
||||
@@ -95,7 +96,7 @@ export interface GetOpenInterestParamsV5 {
|
||||
export interface GetHistoricalVolatilityParamsV5 {
|
||||
category: 'option';
|
||||
baseCoin?: string;
|
||||
period?: number;
|
||||
period?: 7 | 14 | 21 | 30 | 60 | 90 | 180 | 270;
|
||||
startTime?: number;
|
||||
endTime?: number;
|
||||
}
|
||||
@@ -116,3 +117,11 @@ export interface GetOptionDeliveryPriceParamsV5 {
|
||||
limit?: number;
|
||||
cursor?: string;
|
||||
}
|
||||
|
||||
export interface GetDeliveryPriceParamsV5 {
|
||||
category: 'linear' | 'inverse' | 'option';
|
||||
symbol?: string;
|
||||
baseCoin?: string;
|
||||
limit?: number;
|
||||
cursor?: string;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ export type OHLCVKlineV5 = [
|
||||
string,
|
||||
string,
|
||||
string,
|
||||
string
|
||||
string,
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -257,8 +257,15 @@ export interface RiskLimitV5 {
|
||||
maxLeverage: string;
|
||||
}
|
||||
|
||||
/** @deprecated use DeliveryPriceV5 instead */
|
||||
export interface OptionDeliveryPriceV5 {
|
||||
symbol: string;
|
||||
deliveryPrice: string;
|
||||
deliveryTime: string;
|
||||
}
|
||||
|
||||
export interface DeliveryPriceV5 {
|
||||
symbol: string;
|
||||
deliveryPrice: string;
|
||||
deliveryTime: string;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,12 @@ export type ContractTypeV5 =
|
||||
| 'LinearPerpetual'
|
||||
| 'InverseFutures';
|
||||
|
||||
export type InstrumentStatusV5 = 'Pending' | 'Trading' | 'Settling' | 'Closed';
|
||||
export type InstrumentStatusV5 =
|
||||
| 'PreLaunch'
|
||||
| 'Trading'
|
||||
| 'Settling'
|
||||
| 'Delivering'
|
||||
| 'Closed';
|
||||
|
||||
export type OrderFilterV5 = 'Order' | 'tpslOrder';
|
||||
export type OrderSideV5 = 'Buy' | 'Sell';
|
||||
|
||||
Reference in New Issue
Block a user