diff --git a/src/rest-client-v5.ts b/src/rest-client-v5.ts index 9653caa..14f12c7 100644 --- a/src/rest-client-v5.ts +++ b/src/rest-client-v5.ts @@ -231,9 +231,9 @@ export class RestClientV5 extends BaseRestClient { * * Note: Spot does not support pagination, so limit & cursor are invalid. */ - getInstrumentsInfo( - params: GetInstrumentsInfoParamsV5, - ): Promise> { + getInstrumentsInfo( + params: GetInstrumentsInfoParamsV5 & { category: C }, + ): Promise>> { return this.get('/v5/market/instruments-info', params); } diff --git a/src/types/response/v5-market.ts b/src/types/response/v5-market.ts index d65a1f7..9025e12 100644 --- a/src/types/response/v5-market.ts +++ b/src/types/response/v5-market.ts @@ -1,5 +1,6 @@ import { CategoryCursorListV5, + CategoryV5, ContractTypeV5, InstrumentStatusV5, OptionTypeV5, @@ -110,10 +111,14 @@ export interface SpotInstrumentInfoV5 { }; } -export type InstrumentInfoResponseV5 = - | CategoryCursorListV5 - | CategoryCursorListV5 - | CategoryCursorListV5; +type InstrumentInfoV5Mapping = { + linear: LinearInverseInstrumentInfoV5[], + inverse: LinearInverseInstrumentInfoV5[], + option: OptionInstrumentInfoV5[], + spot: SpotInstrumentInfoV5[] +}; + +export type InstrumentInfoResponseV5 = CategoryCursorListV5; export default interface OrderbookLevelV5 { price: string;