UNPKG

@binance/derivatives-trading-usds-futures

Version:

Official Binance Derivatives Trading (COIN-M Futures) Connector - A lightweight library that provides a convenient interface to Binance's COINN-M Futures REST API, WebSocket API and WebSocket Streams.

2,169 lines (2,167 loc) 885 kB
import { BadRequestError, ConfigurationRestAPI, ConfigurationWebsocketAPI, ConfigurationWebsocketStreams, ConnectorClientError, DERIVATIVES_TRADING_USDS_FUTURES_REST_API_DEMO_URL, DERIVATIVES_TRADING_USDS_FUTURES_REST_API_PROD_URL, DERIVATIVES_TRADING_USDS_FUTURES_REST_API_TESTNET_URL, DERIVATIVES_TRADING_USDS_FUTURES_WS_API_PROD_URL, DERIVATIVES_TRADING_USDS_FUTURES_WS_API_TESTNET_URL, DERIVATIVES_TRADING_USDS_FUTURES_WS_STREAMS_PROD_URL, DERIVATIVES_TRADING_USDS_FUTURES_WS_STREAMS_TESTNET_URL, ForbiddenError, NetworkError, NotFoundError, RateLimitBanError, RequiredError, RestApiResponse, ServerError, TooManyRequestsError, UnauthorizedError, WebsocketAPIBase, WebsocketApiResponse, WebsocketSendMsgOptions, WebsocketStream, WebsocketStreamsBase } from "@binance/common"; //#region src/rest-api/types/accept-the-offered-quote-response.d.ts /** * Futures (USDⓈ-M) REST API * * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface AcceptTheOfferedQuoteResponse */ interface AcceptTheOfferedQuoteResponse { /** * * @type {string} * @memberof AcceptTheOfferedQuoteResponse */ orderId?: string; /** * * @type {number | bigint} * @memberof AcceptTheOfferedQuoteResponse */ createTime?: number | bigint; /** * * @type {string} * @memberof AcceptTheOfferedQuoteResponse */ orderStatus?: string; } //#endregion //#region src/rest-api/types/account-information-v2-response-assets-inner.d.ts /** * Futures (USDⓈ-M) REST API * * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface AccountInformationV2ResponseAssetsInner */ interface AccountInformationV2ResponseAssetsInner { /** * Asset name. * @type {string} * @memberof AccountInformationV2ResponseAssetsInner */ asset?: string; /** * Wallet balance. * @type {string} * @memberof AccountInformationV2ResponseAssetsInner */ walletBalance?: string; /** * Unrealized profit. * @type {string} * @memberof AccountInformationV2ResponseAssetsInner */ unrealizedProfit?: string; /** * Margin balance. * @type {string} * @memberof AccountInformationV2ResponseAssetsInner */ marginBalance?: string; /** * Maintenance margin requirement. * @type {string} * @memberof AccountInformationV2ResponseAssetsInner */ maintMargin?: string; /** * Total initial margin requirement. * @type {string} * @memberof AccountInformationV2ResponseAssetsInner */ initialMargin?: string; /** * Initial margin required for positions. * @type {string} * @memberof AccountInformationV2ResponseAssetsInner */ positionInitialMargin?: string; /** * Initial margin required for open orders. * @type {string} * @memberof AccountInformationV2ResponseAssetsInner */ openOrderInitialMargin?: string; /** * Cross wallet balance. * @type {string} * @memberof AccountInformationV2ResponseAssetsInner */ crossWalletBalance?: string; /** * Unrealized PnL for cross positions. * @type {string} * @memberof AccountInformationV2ResponseAssetsInner */ crossUnPnl?: string; /** * Available balance. * @type {string} * @memberof AccountInformationV2ResponseAssetsInner */ availableBalance?: string; /** * Maximum transferable/withdrawable amount. * @type {string} * @memberof AccountInformationV2ResponseAssetsInner */ maxWithdrawAmount?: string; /** * Whether the asset can be used as margin in multi-assets mode. * @type {boolean} * @memberof AccountInformationV2ResponseAssetsInner */ marginAvailable?: boolean; /** * Last update time in milliseconds. * @type {number | bigint} * @memberof AccountInformationV2ResponseAssetsInner */ updateTime?: number | bigint; } //#endregion //#region src/rest-api/types/account-information-v2-response-positions-inner.d.ts /** * Futures (USDⓈ-M) REST API * * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * positions of all symbols in the market are returned * @export * @interface AccountInformationV2ResponsePositionsInner */ interface AccountInformationV2ResponsePositionsInner { /** * Symbol. * @type {string} * @memberof AccountInformationV2ResponsePositionsInner */ symbol?: string; /** * Initial margin requirement. * @type {string} * @memberof AccountInformationV2ResponsePositionsInner */ initialMargin?: string; /** * Maintenance margin requirement. * @type {string} * @memberof AccountInformationV2ResponsePositionsInner */ maintMargin?: string; /** * Unrealized profit. * @type {string} * @memberof AccountInformationV2ResponsePositionsInner */ unrealizedProfit?: string; /** * Initial margin required for positions. * @type {string} * @memberof AccountInformationV2ResponsePositionsInner */ positionInitialMargin?: string; /** * Initial margin required for open orders. * @type {string} * @memberof AccountInformationV2ResponsePositionsInner */ openOrderInitialMargin?: string; /** * Current initial leverage. * @type {string} * @memberof AccountInformationV2ResponsePositionsInner */ leverage?: string; /** * Whether the position uses isolated margin mode. * @type {boolean} * @memberof AccountInformationV2ResponsePositionsInner */ isolated?: boolean; /** * Average entry price. * @type {string} * @memberof AccountInformationV2ResponsePositionsInner */ entryPrice?: string; /** * Maximum available notional under current leverage. * @type {string} * @memberof AccountInformationV2ResponsePositionsInner */ maxNotional?: string; /** * Bid notional (ignore). * @type {string} * @memberof AccountInformationV2ResponsePositionsInner */ bidNotional?: string; /** * Ask notional (ignore). * @type {string} * @memberof AccountInformationV2ResponsePositionsInner */ askNotional?: string; /** * Position side. * @type {string} * @memberof AccountInformationV2ResponsePositionsInner */ positionSide?: string; /** * Position quantity. * @type {string} * @memberof AccountInformationV2ResponsePositionsInner */ positionAmt?: string; /** * Last update time in milliseconds. * @type {number | bigint} * @memberof AccountInformationV2ResponsePositionsInner */ updateTime?: number | bigint; } //#endregion //#region src/rest-api/types/account-information-v2-response.d.ts /** * * @export * @interface AccountInformationV2Response */ interface AccountInformationV2Response$1 { /** * Account commission tier. * @type {number | bigint} * @memberof AccountInformationV2Response */ feeTier?: number | bigint; /** * Whether fee discount is enabled. * @type {boolean} * @memberof AccountInformationV2Response */ feeBurn?: boolean; /** * Whether trading is enabled. * @type {boolean} * @memberof AccountInformationV2Response */ canTrade?: boolean; /** * Whether transfer-in is enabled. * @type {boolean} * @memberof AccountInformationV2Response */ canDeposit?: boolean; /** * Whether transfer-out is enabled. * @type {boolean} * @memberof AccountInformationV2Response */ canWithdraw?: boolean; /** * Reserved field, ignore. * @type {number | bigint} * @memberof AccountInformationV2Response */ updateTime?: number | bigint; /** * Whether multi-assets mode is enabled. * @type {boolean} * @memberof AccountInformationV2Response */ multiAssetsMargin?: boolean; /** * Trade group identifier. * @type {number | bigint} * @memberof AccountInformationV2Response */ tradeGroupId?: number | bigint; /** * Total initial margin requirement. * @type {string} * @memberof AccountInformationV2Response */ totalInitialMargin?: string; /** * Total maintenance margin requirement. * @type {string} * @memberof AccountInformationV2Response */ totalMaintMargin?: string; /** * Total wallet balance. * @type {string} * @memberof AccountInformationV2Response */ totalWalletBalance?: string; /** * Total unrealized profit. * @type {string} * @memberof AccountInformationV2Response */ totalUnrealizedProfit?: string; /** * Total margin balance. * @type {string} * @memberof AccountInformationV2Response */ totalMarginBalance?: string; /** * Initial margin required for positions. * @type {string} * @memberof AccountInformationV2Response */ totalPositionInitialMargin?: string; /** * Initial margin required for open orders. * @type {string} * @memberof AccountInformationV2Response */ totalOpenOrderInitialMargin?: string; /** * Cross wallet balance. * @type {string} * @memberof AccountInformationV2Response */ totalCrossWalletBalance?: string; /** * Unrealized PnL for cross positions. * @type {string} * @memberof AccountInformationV2Response */ totalCrossUnPnl?: string; /** * Available balance. * @type {string} * @memberof AccountInformationV2Response */ availableBalance?: string; /** * Maximum transferable/withdrawable amount. * @type {string} * @memberof AccountInformationV2Response */ maxWithdrawAmount?: string; /** * Asset-level account details. * @type {Array<AccountInformationV2ResponseAssetsInner>} * @memberof AccountInformationV2Response */ assets?: Array<AccountInformationV2ResponseAssetsInner>; /** * Position details for symbols. One-way mode returns BOTH; hedge mode returns LONG/SHORT. * @type {Array<AccountInformationV2ResponsePositionsInner>} * @memberof AccountInformationV2Response */ positions?: Array<AccountInformationV2ResponsePositionsInner>; } //#endregion //#region src/rest-api/types/account-information-v3-response-assets-inner.d.ts /** * Futures (USDⓈ-M) REST API * * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * For assets that are quote assets, USDT/USDC/BTC * @export * @interface AccountInformationV3ResponseAssetsInner */ interface AccountInformationV3ResponseAssetsInner { /** * Asset name. * @type {string} * @memberof AccountInformationV3ResponseAssetsInner */ asset?: string; /** * Wallet balance. * @type {string} * @memberof AccountInformationV3ResponseAssetsInner */ walletBalance?: string; /** * Unrealized profit. * @type {string} * @memberof AccountInformationV3ResponseAssetsInner */ unrealizedProfit?: string; /** * Margin balance. * @type {string} * @memberof AccountInformationV3ResponseAssetsInner */ marginBalance?: string; /** * Maintenance margin requirement. * @type {string} * @memberof AccountInformationV3ResponseAssetsInner */ maintMargin?: string; /** * Total initial margin requirement. * @type {string} * @memberof AccountInformationV3ResponseAssetsInner */ initialMargin?: string; /** * Initial margin required for positions. * @type {string} * @memberof AccountInformationV3ResponseAssetsInner */ positionInitialMargin?: string; /** * Initial margin required for open orders. * @type {string} * @memberof AccountInformationV3ResponseAssetsInner */ openOrderInitialMargin?: string; /** * Cross wallet balance. * @type {string} * @memberof AccountInformationV3ResponseAssetsInner */ crossWalletBalance?: string; /** * Unrealized PnL for cross positions. * @type {string} * @memberof AccountInformationV3ResponseAssetsInner */ crossUnPnl?: string; /** * Available balance. * @type {string} * @memberof AccountInformationV3ResponseAssetsInner */ availableBalance?: string; /** * Maximum transferable/withdrawable amount. * @type {string} * @memberof AccountInformationV3ResponseAssetsInner */ maxWithdrawAmount?: string; /** * Last update time in milliseconds. * @type {number | bigint} * @memberof AccountInformationV3ResponseAssetsInner */ updateTime?: number | bigint; } //#endregion //#region src/rest-api/types/account-information-v3-response-positions-inner.d.ts /** * Futures (USDⓈ-M) REST API * * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * positions of all symbols user had position/ open orders are returned * @export * @interface AccountInformationV3ResponsePositionsInner */ interface AccountInformationV3ResponsePositionsInner { /** * Symbol. * @type {string} * @memberof AccountInformationV3ResponsePositionsInner */ symbol?: string; /** * Position side. * @type {string} * @memberof AccountInformationV3ResponsePositionsInner */ positionSide?: string; /** * Position quantity. * @type {string} * @memberof AccountInformationV3ResponsePositionsInner */ positionAmt?: string; /** * Unrealized profit. * @type {string} * @memberof AccountInformationV3ResponsePositionsInner */ unrealizedProfit?: string; /** * Isolated margin. * @type {string} * @memberof AccountInformationV3ResponsePositionsInner */ isolatedMargin?: string; /** * Position notional value. * @type {string} * @memberof AccountInformationV3ResponsePositionsInner */ notional?: string; /** * Isolated wallet balance. * @type {string} * @memberof AccountInformationV3ResponsePositionsInner */ isolatedWallet?: string; /** * Initial margin requirement. * @type {string} * @memberof AccountInformationV3ResponsePositionsInner */ initialMargin?: string; /** * Maintenance margin requirement. * @type {string} * @memberof AccountInformationV3ResponsePositionsInner */ maintMargin?: string; /** * Last update time in milliseconds. * @type {number | bigint} * @memberof AccountInformationV3ResponsePositionsInner */ updateTime?: number | bigint; } //#endregion //#region src/rest-api/types/account-information-v3-response.d.ts /** * * @export * @interface AccountInformationV3Response */ interface AccountInformationV3Response { /** * Total initial margin requirement. * @type {string} * @memberof AccountInformationV3Response */ totalInitialMargin?: string; /** * Total maintenance margin requirement. * @type {string} * @memberof AccountInformationV3Response */ totalMaintMargin?: string; /** * Total wallet balance. * @type {string} * @memberof AccountInformationV3Response */ totalWalletBalance?: string; /** * Total unrealized profit. * @type {string} * @memberof AccountInformationV3Response */ totalUnrealizedProfit?: string; /** * Total margin balance. * @type {string} * @memberof AccountInformationV3Response */ totalMarginBalance?: string; /** * Initial margin required for positions. * @type {string} * @memberof AccountInformationV3Response */ totalPositionInitialMargin?: string; /** * Initial margin required for open orders. * @type {string} * @memberof AccountInformationV3Response */ totalOpenOrderInitialMargin?: string; /** * Cross wallet balance. * @type {string} * @memberof AccountInformationV3Response */ totalCrossWalletBalance?: string; /** * Unrealized PnL for cross positions. * @type {string} * @memberof AccountInformationV3Response */ totalCrossUnPnl?: string; /** * Available balance. * @type {string} * @memberof AccountInformationV3Response */ availableBalance?: string; /** * Maximum transferable/withdrawable amount. * @type {string} * @memberof AccountInformationV3Response */ maxWithdrawAmount?: string; /** * Asset-level account details. * @type {Array<AccountInformationV3ResponseAssetsInner>} * @memberof AccountInformationV3Response */ assets?: Array<AccountInformationV3ResponseAssetsInner>; /** * Position details for symbols. * @type {Array<AccountInformationV3ResponsePositionsInner>} * @memberof AccountInformationV3Response */ positions?: Array<AccountInformationV3ResponsePositionsInner>; } //#endregion //#region src/rest-api/types/account-trade-list-response-inner.d.ts /** * Futures (USDⓈ-M) REST API * * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface AccountTradeListResponseInner */ interface AccountTradeListResponseInner { /** * Buyer. * @type {boolean} * @memberof AccountTradeListResponseInner */ buyer?: boolean; /** * Commission. * @type {string} * @memberof AccountTradeListResponseInner */ commission?: string; /** * Commission Asset. * @type {string} * @memberof AccountTradeListResponseInner */ commissionAsset?: string; /** * Id. * @type {number | bigint} * @memberof AccountTradeListResponseInner */ id?: number | bigint; /** * Maker. * @type {boolean} * @memberof AccountTradeListResponseInner */ maker?: boolean; /** * Order Id. * @type {number | bigint} * @memberof AccountTradeListResponseInner */ orderId?: number | bigint; /** * Price. * @type {string} * @memberof AccountTradeListResponseInner */ price?: string; /** * Qty. * @type {string} * @memberof AccountTradeListResponseInner */ qty?: string; /** * Quote Qty. * @type {string} * @memberof AccountTradeListResponseInner */ quoteQty?: string; /** * Realized Pnl. * @type {string} * @memberof AccountTradeListResponseInner */ realizedPnl?: string; /** * Side. * @type {string} * @memberof AccountTradeListResponseInner */ side?: string; /** * Position Side. * @type {string} * @memberof AccountTradeListResponseInner */ positionSide?: string; /** * Symbol. * @type {string} * @memberof AccountTradeListResponseInner */ symbol?: string; /** * Time. * @type {number | bigint} * @memberof AccountTradeListResponseInner */ time?: number | bigint; } //#endregion //#region src/rest-api/types/account-trade-list-response.d.ts /** * * @export * @interface AccountTradeListResponse */ interface AccountTradeListResponse extends Array<AccountTradeListResponseInner> {} //#endregion //#region src/rest-api/types/adl-risk-response1.d.ts /** * Futures (USDⓈ-M) REST API * * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface AdlRiskResponse1 */ interface AdlRiskResponse1 { /** * * @type {string} * @memberof AdlRiskResponse1 */ symbol?: string; /** * ADL Risk rating * @type {string} * @memberof AdlRiskResponse1 */ adlRisk?: string; /** * * @type {number | bigint} * @memberof AdlRiskResponse1 */ updateTime?: number | bigint; } //#endregion //#region src/rest-api/types/adl-risk-response2-inner.d.ts /** * Futures (USDⓈ-M) REST API * * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface AdlRiskResponse2Inner */ interface AdlRiskResponse2Inner { /** * * @type {string} * @memberof AdlRiskResponse2Inner */ symbol?: string; /** * ADL Risk rating * @type {string} * @memberof AdlRiskResponse2Inner */ adlRisk?: string; /** * * @type {number | bigint} * @memberof AdlRiskResponse2Inner */ updateTime?: number | bigint; } //#endregion //#region src/rest-api/types/adl-risk-response2.d.ts /** * * @export * @interface AdlRiskResponse2 */ interface AdlRiskResponse2 extends Array<AdlRiskResponse2Inner> {} //#endregion //#region src/rest-api/types/adl-risk-response.d.ts /** * @type AdlRiskResponse */ type AdlRiskResponse = AdlRiskResponse1 | AdlRiskResponse2; //#endregion //#region src/rest-api/types/all-orders-response-inner.d.ts /** * Futures (USDⓈ-M) REST API * * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface AllOrdersResponseInner */ interface AllOrdersResponseInner { /** * Avg Price. * @type {string} * @memberof AllOrdersResponseInner */ avgPrice?: string; /** * Client Order Id. * @type {string} * @memberof AllOrdersResponseInner */ clientOrderId?: string; /** * Cum Quote. * @type {string} * @memberof AllOrdersResponseInner */ cumQuote?: string; /** * Executed Qty. * @type {string} * @memberof AllOrdersResponseInner */ executedQty?: string; /** * Order Id. * @type {number | bigint} * @memberof AllOrdersResponseInner */ orderId?: number | bigint; /** * Orig Qty. * @type {string} * @memberof AllOrdersResponseInner */ origQty?: string; /** * Orig Type. * @type {string} * @memberof AllOrdersResponseInner */ origType?: string; /** * Price. * @type {string} * @memberof AllOrdersResponseInner */ price?: string; /** * Reduce Only. * @type {boolean} * @memberof AllOrdersResponseInner */ reduceOnly?: boolean; /** * Side. * @type {string} * @memberof AllOrdersResponseInner */ side?: string; /** * Position Side. * @type {string} * @memberof AllOrdersResponseInner */ positionSide?: string; /** * Status. * @type {string} * @memberof AllOrdersResponseInner */ status?: string; /** * please ignore when order type is TRAILING_STOP_MARKET * @type {string} * @memberof AllOrdersResponseInner */ stopPrice?: string; /** * if Close-All * @type {boolean} * @memberof AllOrdersResponseInner */ closePosition?: boolean; /** * Symbol. * @type {string} * @memberof AllOrdersResponseInner */ symbol?: string; /** * order time * @type {number | bigint} * @memberof AllOrdersResponseInner */ time?: number | bigint; /** * Time In Force. * @type {string} * @memberof AllOrdersResponseInner */ timeInForce?: string; /** * Type. * @type {string} * @memberof AllOrdersResponseInner */ type?: string; /** * activation price, only return with TRAILING_STOP_MARKET order * @type {string} * @memberof AllOrdersResponseInner */ activatePrice?: string; /** * callback rate, only return with TRAILING_STOP_MARKET order * @type {string} * @memberof AllOrdersResponseInner */ priceRate?: string; /** * update time * @type {number | bigint} * @memberof AllOrdersResponseInner */ updateTime?: number | bigint; /** * Working Type. * @type {string} * @memberof AllOrdersResponseInner */ workingType?: string; /** * if conditional order trigger is protected * @type {boolean} * @memberof AllOrdersResponseInner */ priceProtect?: boolean; /** * price match mode * @type {string} * @memberof AllOrdersResponseInner */ priceMatch?: string; /** * self trading preventation mode * @type {string} * @memberof AllOrdersResponseInner */ selfTradePreventionMode?: string; /** * order pre-set auot cancel time for TIF GTD order * @type {number | bigint} * @memberof AllOrdersResponseInner */ goodTillDate?: number | bigint; } //#endregion //#region src/rest-api/types/all-orders-response.d.ts /** * * @export * @interface AllOrdersResponse */ interface AllOrdersResponse extends Array<AllOrdersResponseInner> {} //#endregion //#region src/rest-api/types/asset-index-response1.d.ts /** * Futures (USDⓈ-M) REST API * * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface AssetIndexResponse1 */ interface AssetIndexResponse1 { /** * * @type {string} * @memberof AssetIndexResponse1 */ symbol?: string; /** * * @type {number | bigint} * @memberof AssetIndexResponse1 */ time?: number | bigint; /** * * @type {string} * @memberof AssetIndexResponse1 */ index?: string; /** * * @type {string} * @memberof AssetIndexResponse1 */ bidBuffer?: string; /** * * @type {string} * @memberof AssetIndexResponse1 */ askBuffer?: string; /** * * @type {string} * @memberof AssetIndexResponse1 */ bidRate?: string; /** * * @type {string} * @memberof AssetIndexResponse1 */ askRate?: string; /** * * @type {string} * @memberof AssetIndexResponse1 */ autoExchangeBidBuffer?: string; /** * * @type {string} * @memberof AssetIndexResponse1 */ autoExchangeAskBuffer?: string; /** * * @type {string} * @memberof AssetIndexResponse1 */ autoExchangeBidRate?: string; /** * * @type {string} * @memberof AssetIndexResponse1 */ autoExchangeAskRate?: string; } //#endregion //#region src/rest-api/types/asset-index-response2-inner.d.ts /** * Futures (USDⓈ-M) REST API * * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface AssetIndexResponse2Inner */ interface AssetIndexResponse2Inner { /** * * @type {string} * @memberof AssetIndexResponse2Inner */ symbol?: string; /** * * @type {number | bigint} * @memberof AssetIndexResponse2Inner */ time?: number | bigint; /** * * @type {string} * @memberof AssetIndexResponse2Inner */ index?: string; /** * * @type {string} * @memberof AssetIndexResponse2Inner */ bidBuffer?: string; /** * * @type {string} * @memberof AssetIndexResponse2Inner */ askBuffer?: string; /** * * @type {string} * @memberof AssetIndexResponse2Inner */ bidRate?: string; /** * * @type {string} * @memberof AssetIndexResponse2Inner */ askRate?: string; /** * * @type {string} * @memberof AssetIndexResponse2Inner */ autoExchangeBidBuffer?: string; /** * * @type {string} * @memberof AssetIndexResponse2Inner */ autoExchangeAskBuffer?: string; /** * * @type {string} * @memberof AssetIndexResponse2Inner */ autoExchangeBidRate?: string; /** * * @type {string} * @memberof AssetIndexResponse2Inner */ autoExchangeAskRate?: string; } //#endregion //#region src/rest-api/types/asset-index-response2.d.ts /** * * @export * @interface AssetIndexResponse2 */ interface AssetIndexResponse2 extends Array<AssetIndexResponse2Inner> {} //#endregion //#region src/rest-api/types/asset-index-response.d.ts /** * @type AssetIndexResponse */ type AssetIndexResponse$1 = AssetIndexResponse1 | AssetIndexResponse2; //#endregion //#region src/rest-api/types/auto-cancel-all-open-orders-response.d.ts /** * Futures (USDⓈ-M) REST API * * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface AutoCancelAllOpenOrdersResponse */ interface AutoCancelAllOpenOrdersResponse { /** * * @type {string} * @memberof AutoCancelAllOpenOrdersResponse */ symbol?: string; /** * * @type {string} * @memberof AutoCancelAllOpenOrdersResponse */ countdownTime?: string; } //#endregion //#region src/rest-api/types/basis-response-inner.d.ts /** * Futures (USDⓈ-M) REST API * * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface BasisResponseInner */ interface BasisResponseInner { /** * * @type {string} * @memberof BasisResponseInner */ indexPrice?: string; /** * * @type {string} * @memberof BasisResponseInner */ contractType?: string; /** * * @type {string} * @memberof BasisResponseInner */ basisRate?: string; /** * * @type {string} * @memberof BasisResponseInner */ futuresPrice?: string; /** * * @type {string} * @memberof BasisResponseInner */ annualizedBasisRate?: string; /** * * @type {string} * @memberof BasisResponseInner */ basis?: string; /** * * @type {string} * @memberof BasisResponseInner */ pair?: string; /** * * @type {number | bigint} * @memberof BasisResponseInner */ timestamp?: number | bigint; } //#endregion //#region src/rest-api/types/basis-response.d.ts /** * * @export * @interface BasisResponse */ interface BasisResponse extends Array<BasisResponseInner> {} //#endregion //#region src/rest-api/types/cancel-algo-order-response.d.ts /** * Futures (USDⓈ-M) REST API * * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface CancelAlgoOrderResponse */ interface CancelAlgoOrderResponse$1 { /** * * @type {number | bigint} * @memberof CancelAlgoOrderResponse */ algoId?: number | bigint; /** * * @type {string} * @memberof CancelAlgoOrderResponse */ clientAlgoId?: string; /** * * @type {string} * @memberof CancelAlgoOrderResponse */ code?: string; /** * * @type {string} * @memberof CancelAlgoOrderResponse */ msg?: string; } //#endregion //#region src/rest-api/types/cancel-all-algo-open-orders-response.d.ts /** * Futures (USDⓈ-M) REST API * * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface CancelAllAlgoOpenOrdersResponse */ interface CancelAllAlgoOpenOrdersResponse { /** * * @type {number | bigint} * @memberof CancelAllAlgoOpenOrdersResponse */ code?: number | bigint; /** * * @type {string} * @memberof CancelAllAlgoOpenOrdersResponse */ msg?: string; } //#endregion //#region src/rest-api/types/cancel-all-open-orders-response.d.ts /** * Futures (USDⓈ-M) REST API * * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface CancelAllOpenOrdersResponse */ interface CancelAllOpenOrdersResponse { /** * * @type {number | bigint} * @memberof CancelAllOpenOrdersResponse */ code?: number | bigint; /** * * @type {string} * @memberof CancelAllOpenOrdersResponse */ msg?: string; } //#endregion //#region src/rest-api/types/cancel-multiple-orders-response-inner.d.ts /** * Futures (USDⓈ-M) REST API * * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface CancelMultipleOrdersResponseInner */ interface CancelMultipleOrdersResponseInner { /** * Client Order Id. * @type {string} * @memberof CancelMultipleOrdersResponseInner */ clientOrderId?: string; /** * * @type {string} * @memberof CancelMultipleOrdersResponseInner */ cumQty?: string; /** * Executed Qty. * @type {string} * @memberof CancelMultipleOrdersResponseInner */ executedQty?: string; /** * Order Id. * @type {number | bigint} * @memberof CancelMultipleOrdersResponseInner */ orderId?: number | bigint; /** * Orig Qty. * @type {string} * @memberof CancelMultipleOrdersResponseInner */ origQty?: string; /** * Price. * @type {string} * @memberof CancelMultipleOrdersResponseInner */ price?: string; /** * Reduce Only. * @type {boolean} * @memberof CancelMultipleOrdersResponseInner */ reduceOnly?: boolean; /** * Side. * @type {string} * @memberof CancelMultipleOrdersResponseInner */ side?: string; /** * Position Side. * @type {string} * @memberof CancelMultipleOrdersResponseInner */ positionSide?: string; /** * Status. * @type {string} * @memberof CancelMultipleOrdersResponseInner */ status?: string; /** * please ignore when order type is TRAILING_STOP_MARKET * @type {string} * @memberof CancelMultipleOrdersResponseInner */ stopPrice?: string; /** * if Close-All * @type {boolean} * @memberof CancelMultipleOrdersResponseInner */ closePosition?: boolean; /** * Symbol. * @type {string} * @memberof CancelMultipleOrdersResponseInner */ symbol?: string; /** * Time In Force. * @type {string} * @memberof CancelMultipleOrdersResponseInner */ timeInForce?: string; /** * Orig Type. * @type {string} * @memberof CancelMultipleOrdersResponseInner */ origType?: string; /** * Type. * @type {string} * @memberof CancelMultipleOrdersResponseInner */ type?: string; /** * activation price, only return with TRAILING_STOP_MARKET order * @type {string} * @memberof CancelMultipleOrdersResponseInner */ activatePrice?: string; /** * callback rate, only return with TRAILING_STOP_MARKET order * @type {string} * @memberof CancelMultipleOrdersResponseInner */ priceRate?: string; /** * Update Time. * @type {number | bigint} * @memberof CancelMultipleOrdersResponseInner */ updateTime?: number | bigint; /** * Working Type. * @type {string} * @memberof CancelMultipleOrdersResponseInner */ workingType?: string; /** * if conditional order trigger is protected * @type {boolean} * @memberof CancelMultipleOrdersResponseInner */ priceProtect?: boolean; /** * price match mode * @type {string} * @memberof CancelMultipleOrdersResponseInner */ priceMatch?: string; /** * self trading preventation mode * @type {string} * @memberof CancelMultipleOrdersResponseInner */ selfTradePreventionMode?: string; /** * order pre-set auot cancel time for TIF GTD order * @type {number | bigint} * @memberof CancelMultipleOrdersResponseInner */ goodTillDate?: number | bigint; /** * * @type {number | bigint} * @memberof CancelMultipleOrdersResponseInner */ code?: number | bigint; /** * * @type {string} * @memberof CancelMultipleOrdersResponseInner */ msg?: string; } //#endregion //#region src/rest-api/types/cancel-multiple-orders-response.d.ts /** * * @export * @interface CancelMultipleOrdersResponse */ interface CancelMultipleOrdersResponse extends Array<CancelMultipleOrdersResponseInner> {} //#endregion //#region src/rest-api/types/cancel-order-response.d.ts /** * Futures (USDⓈ-M) REST API * * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface CancelOrderResponse */ interface CancelOrderResponse$1 { /** * Client Order Id. * @type {string} * @memberof CancelOrderResponse */ clientOrderId?: string; /** * * @type {string} * @memberof CancelOrderResponse */ cumQty?: string; /** * Executed Qty. * @type {string} * @memberof CancelOrderResponse */ executedQty?: string; /** * Order Id. * @type {number | bigint} * @memberof CancelOrderResponse */ orderId?: number | bigint; /** * Orig Qty. * @type {string} * @memberof CancelOrderResponse */ origQty?: string; /** * Price. * @type {string} * @memberof CancelOrderResponse */ price?: string; /** * Reduce Only. * @type {boolean} * @memberof CancelOrderResponse */ reduceOnly?: boolean; /** * Side. * @type {string} * @memberof CancelOrderResponse */ side?: string; /** * Position Side. * @type {string} * @memberof CancelOrderResponse */ positionSide?: string; /** * Status. * @type {string} * @memberof CancelOrderResponse */ status?: string; /** * please ignore when order type is TRAILING_STOP_MARKET * @type {string} * @memberof CancelOrderResponse */ stopPrice?: string; /** * if Close-All * @type {boolean} * @memberof CancelOrderResponse */ closePosition?: boolean; /** * Symbol. * @type {string} * @memberof CancelOrderResponse */ symbol?: string; /** * Time In Force. * @type {string} * @memberof CancelOrderResponse */ timeInForce?: string; /** * Orig Type. * @type {string} * @memberof CancelOrderResponse */ origType?: string; /** * Type. * @type {string} * @memberof CancelOrderResponse */ type?: string; /** * activation price, only return with TRAILING_STOP_MARKET order * @type {string} * @memberof CancelOrderResponse */ activatePrice?: string; /** * callback rate, only return with TRAILING_STOP_MARKET order * @type {string} * @memberof CancelOrderResponse */ priceRate?: string; /** * Update Time. * @type {number | bigint} * @memberof CancelOrderResponse */ updateTime?: number | bigint; /** * Working Type. * @type {string} * @memberof CancelOrderResponse */ workingType?: string; /** * if conditional order trigger is protected * @type {boolean} * @memberof CancelOrderResponse */ priceProtect?: boolean; /** * price match mode * @type {string} * @memberof CancelOrderResponse */ priceMatch?: string; /** * self trading preventation mode * @type {string} * @memberof CancelOrderResponse */ selfTradePreventionMode?: string; /** * order pre-set auot cancel time for TIF GTD order * @type {number | bigint} * @memberof CancelOrderResponse */ goodTillDate?: number | bigint; } //#endregion //#region src/rest-api/types/change-initial-leverage-response.d.ts /** * Futures (USDⓈ-M) REST API * * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface ChangeInitialLeverageResponse */ interface ChangeInitialLeverageResponse { /** * Leverage. * @type {number | bigint} * @memberof ChangeInitialLeverageResponse */ leverage?: number | bigint; /** * Max Notional Value. * @type {string} * @memberof ChangeInitialLeverageResponse */ maxNotionalValue?: string; /** * Symbol. * @type {string} * @memberof ChangeInitialLeverageResponse */ symbol?: string; } //#endregion //#region src/rest-api/types/change-margin-type-response.d.ts /** * Futures (USDⓈ-M) REST API * * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface ChangeMarginTypeResponse */ interface ChangeMarginTypeResponse { /** * * @type {number | bigint} * @memberof ChangeMarginTypeResponse */ code?: number | bigint; /** * * @type {string} * @memberof ChangeMarginTypeResponse */ msg?: string; } //#endregion //#region src/rest-api/types/change-multi-assets-mode-response.d.ts /** * Futures (USDⓈ-M) REST API * * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface ChangeMultiAssetsModeResponse */ interface ChangeMultiAssetsModeResponse { /** * * @type {number | bigint} * @memberof ChangeMultiAssetsModeResponse */ code?: number | bigint; /** * * @type {string} * @memberof ChangeMultiAssetsModeResponse */ msg?: string; } //#endregion //#region src/rest-api/types/change-position-mode-response.d.ts /** * Futures (USDⓈ-M) REST API * * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface ChangePositionModeResponse */ interface ChangePositionModeResponse { /** * * @type {number | bigint} * @memberof ChangePositionModeResponse */ code?: number | bigint; /** * * @type {string} * @memberof ChangePositionModeResponse */ msg?: string; } //#endregion //#region src/rest-api/types/check-server-time-response.d.ts /** * Futures (USDⓈ-M) REST API * * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface CheckServerTimeResponse */ interface CheckServerTimeResponse { /** * Server Time. * @type {number | bigint} * @memberof CheckServerTimeResponse */ serverTime?: number | bigint; } //#endregion //#region src/rest-api/types/classic-portfolio-margin-account-information-response.d.ts /** * Futures (USDⓈ-M) REST API * * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface ClassicPortfolioMarginAccountInformationResponse */ interface ClassicPortfolioMarginAccountInformationResponse { /** * Classic Portfolio margin maximum virtual amount for transfer out in USD * @type {string} * @memberof ClassicPortfolioMarginAccountInformationResponse */ maxWithdrawAmountUSD?: string; /** * * @type {string} * @memberof ClassicPortfolioMarginAccountInformationResponse */ asset?: string; /** * maximum amount for transfer out * @type {string} * @memberof ClassicPortfolioMarginAccountInformationResponse */ maxWithdrawAmount?: string; } //#endregion //#region src/rest-api/types/composite-index-symbol-information-response-inner-base-asset-list-inner.d.ts /** * Futures (USDⓈ-M) REST API * * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface CompositeIndexSymbolInformationResponseInnerBaseAssetListInner */ interface CompositeIndexSymbolInformationResponseInnerBaseAssetListInner { /** * Base Asset. * @type {string} * @memberof CompositeIndexSymbolInformationResponseInnerBaseAssetListInner */ baseAsset?: string; /** * Quote Asset. * @type {string} * @memberof CompositeIndexSymbolInformationResponseInnerBaseAssetListInner */ quoteAsset?: string; /** * Weight In Quantity. * @type {string} * @memberof CompositeIndexSymbolInformationResponseInnerBaseAssetListInner */ weightInQuantity?: string; /** * Weight In Percentage. * @type {string} * @memberof CompositeIndexSymbolInformationResponseInnerBaseAssetListInner */ weightInPercentage?: string; } //#endregion //#region src/rest-api/types/composite-index-symbol-information-response-inner.d.ts /** * * @export * @interface CompositeIndexSymbolInformationResponseInner */ interface CompositeIndexSymbolInformationResponseInner { /** * * @type {string} * @memberof CompositeIndexSymbolInformationResponseInner */ symbol?: string; /** * Current time * @type {number | bigint} * @memberof CompositeIndexSymbolInformationResponseInner */ time?: number | bigint; /** * Component asset * @type {string} * @memberof CompositeIndexSymbolInformationResponseInner */ component?: string; /** * * @type {Array<CompositeIndexSymbolInformationResponseInnerBaseAssetListInner>} * @memberof CompositeIndexSymbolInformationResponseInner */ baseAssetList?: Array<CompositeIndexSymbolInformationResponseInnerBaseAssetListInner>; } //#endregion //#region src/rest-api/types/composite-index-symbol-information-response.d.ts /** * * @export * @interface CompositeIndexSymbolInformationResponse */ interface CompositeIndexSymbolInformationResponse extends Array<CompositeIndexSymbolInformationResponseInner> {} //#endregion //#region src/rest-api/types/compressed-aggregate-trades-list-response-inner.d.ts /** * Futures (USDⓈ-M) REST API * * Access market data, manage accounts, and trade USDⓈ-M perpetual futures. * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface CompressedAggregateTradesListResponseInner */ interface CompressedAggregateTradesListResponseInner { /** * Aggregate tradeId * @type {number | bigint} * @memberof CompressedAggregateTradesListResponseInner */ a?: number | bigint; /** * Price * @type {string} * @memberof CompressedAggregateTradesListResponseInner */ p?: string; /** * Quantity * @type {string} * @memberof CompressedAggregateTradesListResponseInner */ q?: string; /** * Normal quantity without the trades involving RPI orders * @type {string} * @memberof CompressedAggregateTradesListResponseInner */ nq?: string; /** * First tradeId * @type {number | bigint} * @memberof CompressedAggregateTradesListResponseInner */ f?: number | bigint; /** * Last tradeId * @type {number | bigint} * @memberof CompressedAggregateTradesListResponseInner */ l?: number | bigint; /** * Timestamp * @type {number | bigint} * @memberof CompressedAggregateTradesListResponseInner */ T?: number | bigint; /** * Was the buyer the maker? * @type {boolean} * @memberof CompressedAggregateTradesListResponseInner */ m?: boolean; } //#endregion //#regio