From 4ea4862ea65f3636810a853bb0253f1e34f7295f Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 26 Oct 2026 08:10:56 +0000 Subject: [PATCH 1/2] feat(v4.8.4): add referral commission, campaign, identity, and invitation endpoints - Add getReferralCommissionRecords for POST /v5/referral/commission/records - Add getReferralCampaignRewards for POST /v5/referral/campaign/rewards - Add getReferralUserIdentityProfile for POST /v5/referral/user/identity-profile - Add getReferralUserInvitations for POST /v5/referral/user/invitations Co-authored-by: Jerko J --- package-lock.json | 4 +- package.json | 2 +- src/rest-client-v5.ts | 61 +++++++++ src/types/request/v5-user.ts | 60 ++++++++ src/types/response/v5-user.ts | 248 ++++++++++++++++++++++++++++++++++ 5 files changed, 372 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 32a3cccf..a9e76876 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "bybit-api", - "version": "4.8.3", + "version": "4.8.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "bybit-api", - "version": "4.8.3", + "version": "4.8.4", "license": "MIT", "dependencies": { "@types/ws": "8.18.1", diff --git a/package.json b/package.json index e0fee7a7..0874b489 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bybit-api", - "version": "4.8.3", + "version": "4.8.4", "description": "Complete & robust Node.js SDK for Bybit's REST APIs and WebSockets, with TypeScript & strong end to end tests.", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/src/rest-client-v5.ts b/src/rest-client-v5.ts index d3b53e5d..09177550 100644 --- a/src/rest-client-v5.ts +++ b/src/rest-client-v5.ts @@ -379,6 +379,8 @@ import { GetPwmInvestmentPlanDetailParamsV5, GetPwmInvestmentPlanOrdersParamsV5, GetPwmPendingInvestmentPlanDetailParamsV5, + GetReferralCommissionRecordsParamsV5, + GetReferralUserInvitationsParamsV5, GetRenewOrderInfoFixedParamsV5, GetRepaymentHistoryFixedParamsV5, GetRepaymentHistoryFlexibleParamsV5, @@ -528,7 +530,11 @@ import { RedeemFixedTermEarnResultV5, RedeemPwmInvestmentPlanParamsV5, RedeemPwmInvestmentPlanResultV5, + ReferralCampaignRewardsResultV5, ReferralCodesResultV5, + ReferralCommissionRecordsResultV5, + ReferralUserIdentityProfileV5, + ReferralUserInvitationsResultV5, ReinvestLiquidityMiningParamsV5, ReinvestLiquidityMiningResultV5, RenewBorrowOrderFixedParamsV5, @@ -3021,6 +3027,61 @@ export class RestClientV5 extends BaseRestClient { return this.getPrivate('/v5/user/invitation/code'); } + /** + * Query referral commission records for the authenticated inviter. + * + * The inviter comes from the API key. Do not send an inviter user ID. + * Response `userId` is a masked invitee ID. A JSON body is required; pass + * `{}` or omit `params` when no filter is needed. Property names follow the + * proto camelCase names. Gateway serialization is not independently verified. + */ + getReferralCommissionRecords( + params?: GetReferralCommissionRecordsParamsV5, + ): Promise> { + return this.postPrivate('/v5/referral/commission/records', params ?? {}); + } + + /** + * Get referral rules and configured campaign tasks for the current site. + * + * Static configuration only. This does not return task progress, reward + * claims, or payouts. `tasks` entries are JSON strings + * (`ReferralCampaignTaskPayloadV5`). Send an empty JSON object. + */ + getReferralCampaignRewards(): Promise< + APIResponseV3WithTime + > { + return this.postPrivate('/v5/referral/campaign/rewards', {}); + } + + /** + * Get the authenticated user's referral identity and available commission. + * + * `inviterAffiliateUserId` and `inviterUserId` are relationship flags + * (`1` or `0`), not user IDs. `commissionInfo` is present only when an M1 + * inviter record matches this user and the commission query succeeds. + * Send an empty JSON object. Gateway serialization, including int64 and + * enum representation, is not independently verified. + */ + getReferralUserIdentityProfile(): Promise< + APIResponseV3WithTime + > { + return this.postPrivate('/v5/referral/user/identity-profile', {}); + } + + /** + * Query invitation records for the authenticated referral user. + * + * Do not send the caller's user ID. A JSON body is required; pass `{}` or + * omit `params` when no filter is needed. Gateway serialization is not + * independently verified. + */ + getReferralUserInvitations( + params?: GetReferralUserInvitationsParamsV5, + ): Promise> { + return this.postPrivate('/v5/referral/user/invitations', params ?? {}); + } + /** * Sign Agreement * To trade commodity contracts (e.g. metals XAU/XAG perps, crude oil perps), complete the agreement signing first. diff --git a/src/types/request/v5-user.ts b/src/types/request/v5-user.ts index af4351d7..58441687 100644 --- a/src/types/request/v5-user.ts +++ b/src/types/request/v5-user.ts @@ -86,6 +86,66 @@ export interface GetFriendReferralsParamsV5 { cursor?: string; } +/** + * Referral product line. + * + * 0 unknown, 1 spot, 2 contracts, 3 options, 4 USDC perpetual, 6 TradeFi, 9 Alpha. + * Unrecognized response values are returned as 0. + */ +export type ReferralProductLineV5 = 0 | 1 | 2 | 3 | 4 | 6 | 9; + +/** + * Invitee status (`friendStatus`). + * + * 0 unknown, 1 signed up, 2 first deposit, 3 first trade, 4 qualified, + * 5 not qualified, 6 historical invitation, 7 boost in progress, + * 8 boost qualified, 9 boost failed, 10 boost user signed up. + */ +export type ReferralFriendStatusV5 = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10; + +/** + * POST /v5/referral/commission/records + * + * All fields are optional. Send `{}` when no filter is needed. An empty + * `userIdList` does not filter by invitee. `page` 0 is treated as 1. + * `pageSize` 0 or greater than 200 is treated as 10. + * Times are `YYYY-MM-DD HH:mm:ss`. Property names are the proto camelCase + * names; gateway serialization is not independently verified. + */ +export interface GetReferralCommissionRecordsParamsV5 { + /** Invitee IDs. An empty list does not filter by invitee. */ + userIdList?: number[]; + /** Start time, `YYYY-MM-DD HH:mm:ss`. An unparsable value is sent downstream as `""`. */ + startTime?: string; + /** End time, `YYYY-MM-DD HH:mm:ss`. An unparsable value is sent downstream as `""`. */ + endTime?: string; + /** One-based page. `0` is treated as `1`. */ + page?: number; + /** Page size. `0` or a value greater than 200 is treated as 10. */ + pageSize?: number; + productLine?: ReferralProductLineV5; +} + +/** + * POST /v5/referral/user/invitations + * + * All fields are optional. An empty `userIdList` does not filter by invitee. + * Invalid or empty times are passed downstream as `0`. + */ +export interface GetReferralUserInvitationsParamsV5 { + /** Invitee IDs. An empty list does not filter by invitee. */ + userIdList?: number[]; + /** `YYYY-MM-DD HH:mm:ss`. Invalid or empty values are passed downstream as `0`. */ + startTime?: string; + /** `YYYY-MM-DD HH:mm:ss`. Invalid or empty values are passed downstream as `0`. */ + endTime?: string; + /** Page number. `0` is treated as `1`. */ + page?: number; + /** Page size. `0` or a value greater than 200 is treated as 10. */ + pageSize?: number; + friendStatus?: ReferralFriendStatusV5; +} + /** Sign Agreement. Only master account. * - `category` (legacy): 2 = metals (XAU/XAG perps; stock perps share this); 3 = crude oil. New enum values are not added here; prefer `categoryV2`. * - `categoryV2` (recommended): 1 = metals; 2 = crude oil. Additional values may be added by the API; use a numeric literal or variable. diff --git a/src/types/response/v5-user.ts b/src/types/response/v5-user.ts index 6ce3fc5b..ec0655fb 100644 --- a/src/types/response/v5-user.ts +++ b/src/types/response/v5-user.ts @@ -1,3 +1,7 @@ +import { + ReferralFriendStatusV5, + ReferralProductLineV5, +} from '../request/v5-user'; import { PermissionsV5 } from '../shared-v5'; export interface CreateSubMemberResultV5 { @@ -204,3 +208,247 @@ export interface ReferralCodeItemV5 { export interface ReferralCodesResultV5 { referralCodes: ReferralCodeItemV5[]; } + +/** 0 unknown, 1 awaiting credit, 2 settled. Unrecognized values are returned as 0. */ +export type ReferralCommissionStatusV5 = 0 | 1 | 2; + +export interface ReferralCommissionRecordV5 { + /** Masked invitee ID: first character + `***` + last character. */ + userId: string; + /** Commission payment time, Unix seconds. */ + paymentTime: number; + /** Commission rate. */ + rate: string; + businessUnit: ReferralProductLineV5; + commissionOriginCoin: string; + /** Commission amount in the original currency. */ + commissionOriginAmount: string; + /** Commission value in USDT. */ + commissionUsdtAmount: string; + commissionStatus: ReferralCommissionStatusV5; + /** + * Whether the invitee is a Boost user. May be omitted. + */ + isBoostM2?: boolean; +} + +export interface ReferralCommissionRecordsResultV5 { + records: ReferralCommissionRecordV5[]; + total: number; +} + +export interface ReferralRebateRatioRuleV5 { + /** Referral commission rate, from 0 to 100. */ + rebateRatio: number; + /** Required number of qualified invitees. */ + referralCount: number; + /** Whether the tier requires trading volume. */ + hasTradeCondition: boolean; + /** Trading-volume threshold for the tier. */ + tradeAmountCondition: number; +} + +export interface ReferralRebateRuleV5 { + /** Deposit threshold. Currency and precision are not specified. */ + depositAmount: number; + /** Trading threshold. Currency and precision are not specified. */ + tradeAmount: number; + rebateRatioRules: ReferralRebateRatioRuleV5[]; + /** Number of days that the referral commission lasts. */ + rebateDurationDays: number; + /** + * Currently not populated. A default of `0` does not confirm a threshold. + */ + tradefiDepositAmount?: number; + /** + * Currently not populated. A default of `0` does not confirm a threshold. + */ + tradefiTradeAmount?: number; +} + +/** + * Task reward type. See Bybit enum `awardType`. + * `100` loads reward-packet details. Types `95` and `97` do not currently + * include assembled reward details. + */ +export type ReferralAwardTypeV5 = + | 0 + | 1 + | 2 + | 3 + | 4 + | 5 + | 6 + | 7 + | 8 + | 9 + | 10 + | 11 + | 12 + | 13 + | 14 + | 15 + | 16 + | 17 + | 18 + | 19 + | 95 + | 96 + | 97 + | 98 + | 99 + | 100; + +export interface ReferralCampaignAwardV5 { + /** Regular reward ID or reward packet ID. */ + id: number; + /** + * English reward name. Reward packets use `UP TO ` or + * `EARN `. + */ + name: string; + /** English reward type. Always `Packet` for reward packets. */ + type: string; + /** English product type. Empty for reward packets. */ + productLine: string; + /** UTC RFC 3339. Empty when unavailable or for reward packets. */ + startTime: string; + /** UTC RFC 3339. Empty when unavailable. */ + endTime: string; +} + +/** One configured task inside a parsed campaign JSON string. */ +export interface ReferralCampaignTaskItemV5 { + id: number; + awardType: ReferralAwardTypeV5; + /** English title of each valid rule. `null` when there are no valid rules. */ + ruleTitle: string[] | null; + /** English description of each valid rule. Same index as `ruleTitle`. */ + ruleDescription: string[] | null; + /** First parameter of each valid rule. Same index as `ruleTitle`. */ + ruleParam: string[] | null; + taskAwards: ReferralCampaignAwardV5[]; + /** M1 rewards with `UserRelateType=REFERRAL`. */ + m1Awards: ReferralCampaignAwardV5[]; +} + +/** + * Parsed shape of one `ReferralCampaignRewardsResultV5.tasks` string. + * `schemaVersion` is `2`. This is campaign configuration, not the user's + * task progress or a claimed reward. + */ +export interface ReferralCampaignTaskPayloadV5 { + schemaVersion: 2; + source: 'base' | 'fiat' | 'earn'; + /** Campaign configuration ID, not a user reward-record ID. */ + campaignId: string; + /** May be empty if task details cannot be assembled. */ + tasks: ReferralCampaignTaskItemV5[]; +} + +export interface ReferralCampaignRewardsResultV5 { + /** + * Site referral rules. This does not indicate the tier matched by the + * current user. + */ + rebateRule: ReferralRebateRuleV5; + /** + * Campaign JSON strings, in base, fiat, then earn order when active. + * Parse each string as `ReferralCampaignTaskPayloadV5`. + */ + tasks: string[]; +} + +export interface ReferralCommissionInfoV5 { + totalCommission: string; + yesterdayCommission: string; + totalFriends: number; + /** Number of invitees eligible for commission. */ + qualifiedFriends: number; + walletBalance: string; + /** Current-quarter trading volume of qualified invitees. */ + qualifiedFriendsQuarterTotalTradeVolume: string; + /** + * Active invitees in the current quarter. May be `0` when the source + * value is `0`. + */ + curQuarterActiveFriendsCount: number; + /** Legacy referral-commission programme indicator. */ + hasOldReferral: number; + /** + * 0 unknown or not downgraded, 1 downgraded due to active invitee count, + * 2 downgraded due to invitee trading volume. + */ + degradeType: 0 | 1 | 2; + commissionRate: string; + /** 0 unknown, 1 upgraded, 2 upgrading, 3 not upgraded. */ + upgradeUnifiedAccount: 0 | 1 | 2 | 3; + /** + * 1 enabled, 2 disabled. May be `0` when the source value is `0`. + */ + withdrawalSwitch: 0 | 1 | 2; + /** + * Qualified invitees in the previous quarter. May be `0` when the source + * value is `0`. + */ + lastQuarterQualifiedFriendsCount: number; +} + +export interface ReferralUserIdentityProfileV5 { + isAffiliate: boolean; + /** + * Whether the current user is an M1 inviter. Checked only when the user + * is not an affiliate. + */ + isM1: boolean; + /** + * Affiliate ID from the affiliate direct-customer relationship. `0` if + * none is found. + */ + inviterAffiliateId: number; + /** + * Relationship indicator: `1` when an affiliate direct-customer record + * exists, otherwise `0`. This is not the affiliate user's ID. + */ + inviterAffiliateUserId: number; + /** + * Relationship indicator: `1` when an invitation record exists for the + * current user as invitee, otherwise `0`. This is not the inviter's ID. + */ + inviterUserId: number; + /** + * Present only when an M1 inviter record matches the authenticated user + * and the commission query succeeds. + */ + commissionInfo?: ReferralCommissionInfoV5; +} + +export interface ReferralUserInvitationRecordV5 { + /** Masked invitee ID. */ + userIdMask: string; + /** Invitee registration timestamp. */ + signTime: number; + userStatus: ReferralFriendStatusV5; + /** Total commission, at most eight decimal places. */ + totalCommission: string; + /** + * Unencrypted decimal invitee user ID. `userIdMask` is separate. The docs + * say to confirm that exposing this value is intended. + */ + userId: string; + taskProgress: string; + /** + * `true` for some new EU-site invitees and non-Boost JPN-site invitees. + * The Boost path leaves the default `false`. + */ + notShowCommission: boolean; + /** + * Not populated by the current endpoint. May be omitted, or `""`. + */ + totalBaseRewards?: string; +} + +export interface ReferralUserInvitationsResultV5 { + records: ReferralUserInvitationRecordV5[]; + total: number; +} From 579d6016ad18efaa21d16b586dec86443dbd5d0e Mon Sep 17 00:00:00 2001 From: JJ-Cro sync bot Date: Mon, 26 Oct 2026 09:12:26 +0100 Subject: [PATCH 2/2] chore: regenerate endpoint docs and examples --- docs/endpointFunctionList.md | 848 ++--- llms.txt | 6096 ++++++++++++++++++---------------- 2 files changed, 3738 insertions(+), 3206 deletions(-) diff --git a/docs/endpointFunctionList.md b/docs/endpointFunctionList.md index 2b4f7bd6..9c25affb 100644 --- a/docs/endpointFunctionList.md +++ b/docs/endpointFunctionList.md @@ -49,428 +49,432 @@ This table includes all endpoints from the official Exchange API docs and corres | Function | AUTH | HTTP Method | Endpoint | | -------- | :------: | :------: | -------- | -| [getSystemStatus()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L724) | :closed_lock_with_key: | GET | `/v5/system/status` | -| [getServerTime()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L741) | | GET | `/v5/market/time` | -| [requestDemoTradingFunds()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L753) | :closed_lock_with_key: | POST | `/v5/account/demo-apply-money` | -| [createDemoAccount()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L766) | :closed_lock_with_key: | POST | `/v5/user/create-demo-member` | -| [getSpreadInstrumentsInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L779) | | GET | `/v5/spread/instrument` | -| [getSpreadOrderbook()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L791) | | GET | `/v5/spread/orderbook` | -| [getSpreadTickers()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L801) | | GET | `/v5/spread/tickers` | -| [getSpreadRecentTrades()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L812) | | GET | `/v5/spread/recent-trade` | -| [getSpreadMaxQty()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L824) | :closed_lock_with_key: | GET | `/v5/spread/max-qty` | -| [submitSpreadOrder()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L833) | :closed_lock_with_key: | POST | `/v5/spread/order/create` | -| [amendSpreadOrder()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L846) | :closed_lock_with_key: | POST | `/v5/spread/order/amend` | -| [cancelSpreadOrder()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L858) | :closed_lock_with_key: | POST | `/v5/spread/order/cancel` | -| [cancelAllSpreadOrders()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L876) | :closed_lock_with_key: | POST | `/v5/spread/order/cancel-all` | -| [getSpreadOpenOrders()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L895) | :closed_lock_with_key: | GET | `/v5/spread/order/realtime` | -| [getSpreadOrderHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L912) | :closed_lock_with_key: | GET | `/v5/spread/order/history` | -| [getSpreadTradeHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L928) | :closed_lock_with_key: | GET | `/v5/spread/execution/list` | -| [getKline()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L948) | | GET | `/v5/market/kline` | -| [getMarkPriceKline()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L965) | | GET | `/v5/market/mark-price-kline` | -| [getIndexPriceKline()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L980) | | GET | `/v5/market/index-price-kline` | -| [getPremiumIndexPriceKline()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L995) | | GET | `/v5/market/premium-index-price-kline` | -| [getInstrumentsInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1011) | | GET | `/v5/market/instruments-info` | -| [getInstrumentSummary()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1025) | | GET | `/v5/market/instrument-summary` | -| [getOrderbook()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1036) | | GET | `/v5/market/orderbook` | -| [getFullDepthOrderbook()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1042) | | GET | `/v5/market/full_orderbook` | -| [getRPIOrderbook()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1056) | | GET | `/v5/market/rpi_orderbook` | -| [getTickers()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1062) | | GET | `/v5/market/tickers` | -| [getFundingRateHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1100) | | GET | `/v5/market/funding/history` | -| [getPublicTradingHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1115) | | GET | `/v5/market/recent-trade` | -| [getOpenInterest()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1128) | | GET | `/v5/market/open-interest` | -| [getHistoricalVolatility()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1138) | | GET | `/v5/market/historical-volatility` | -| [getInsurance()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1149) | | GET | `/v5/market/insurance` | -| [getRiskLimit()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1160) | | GET | `/v5/market/risk-limit` | -| [getOptionDeliveryPrice()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1175) | | GET | `/v5/market/delivery-price` | -| [getDeliveryPrice()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1188) | | GET | `/v5/market/delivery-price` | -| [getNewDeliveryPrice()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1204) | | GET | `/v5/market/new-delivery-price` | -| [getLongShortRatio()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1220) | | GET | `/v5/market/account-ratio` | -| [getIndexPriceComponents()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1230) | | GET | `/v5/market/index-price-components` | -| [getOrderPriceLimit()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1236) | | GET | `/v5/market/price-limit` | -| [getADLAlert()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1250) | | GET | `/v5/market/adlAlert` | -| [getFeeGroupStructure()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1263) | | GET | `/v5/market/fee-group-info` | -| [getOptionBaseCoins()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1272) | | GET | `/v5/market/option-base-coins` | -| [submitOrder()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1284) | :closed_lock_with_key: | POST | `/v5/order/create` | -| [amendOrder()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1290) | :closed_lock_with_key: | POST | `/v5/order/amend` | -| [cancelOrder()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1296) | :closed_lock_with_key: | POST | `/v5/order/cancel` | -| [getActiveOrders()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1305) | :closed_lock_with_key: | GET | `/v5/order/realtime` | -| [cancelAllOrders()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1311) | :closed_lock_with_key: | POST | `/v5/order/cancel-all` | -| [getHistoricOrders()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1324) | :closed_lock_with_key: | GET | `/v5/order/history` | -| [getExecutionList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1336) | :closed_lock_with_key: | GET | `/v5/execution/list` | -| [batchSubmitOrders()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1354) | :closed_lock_with_key: | POST | `/v5/order/create-batch` | -| [batchAmendOrders()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1379) | :closed_lock_with_key: | POST | `/v5/order/amend-batch` | -| [batchCancelOrders()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1404) | :closed_lock_with_key: | POST | `/v5/order/cancel-batch` | -| [getSpotBorrowCheck()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1426) | :closed_lock_with_key: | GET | `/v5/order/spot-borrow-check` | -| [setDisconnectCancelAllWindow()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1447) | :closed_lock_with_key: | POST | `/v5/order/disconnected-cancel-all` | -| [setDisconnectCancelAllWindowV2()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1465) | :closed_lock_with_key: | POST | `/v5/order/disconnected-cancel-all` | -| [preCheckOrder()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1480) | :closed_lock_with_key: | POST | `/v5/order/pre-check` | -| [createStrategyOrder()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1497) | :closed_lock_with_key: | POST | `/v5/strategy/create` | -| [getStrategyList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1508) | :closed_lock_with_key: | GET | `/v5/strategy/list` | -| [getStrategyOrderList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1519) | :closed_lock_with_key: | GET | `/v5/strategy/order-list` | -| [stopStrategy()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1530) | :closed_lock_with_key: | POST | `/v5/strategy/stop` | -| [getPositionInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1555) | :closed_lock_with_key: | GET | `/v5/position/list` | -| [getFuturesLeverage()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1567) | :closed_lock_with_key: | GET | `/v5/position/symbol-info` | -| [setLeverage()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1582) | :closed_lock_with_key: | POST | `/v5/position/set-leverage` | -| [switchIsolatedMargin()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1595) | :closed_lock_with_key: | POST | `/v5/position/switch-isolated` | -| [setTPSLMode()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1609) | :closed_lock_with_key: | POST | `/v5/position/set-tpsl-mode` | -| [switchPositionMode()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1624) | :closed_lock_with_key: | POST | `/v5/position/switch-mode` | -| [setRiskLimit()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1638) | :closed_lock_with_key: | POST | `/v5/position/set-risk-limit` | -| [setTradingStop()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1653) | :closed_lock_with_key: | POST | `/v5/position/trading-stop` | -| [setAutoAddMargin()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1664) | :closed_lock_with_key: | POST | `/v5/position/set-auto-add-margin` | -| [addOrReduceMargin()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1676) | :closed_lock_with_key: | POST | `/v5/position/add-margin` | -| [getClosedPnL()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1688) | :closed_lock_with_key: | GET | `/v5/position/closed-pnl` | -| [getClosedOptionsPositions()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1702) | :closed_lock_with_key: | GET | `/v5/position/get-closed-positions` | -| [movePosition()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1727) | :closed_lock_with_key: | POST | `/v5/position/move-positions` | -| [getMovePositionHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1738) | :closed_lock_with_key: | GET | `/v5/position/move-history` | -| [confirmNewRiskLimit()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1757) | :closed_lock_with_key: | POST | `/v5/position/confirm-pending-mmr` | -| [getPreUpgradeOrderHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1777) | :closed_lock_with_key: | GET | `/v5/pre-upgrade/order/history` | -| [getPreUpgradeTradeHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1792) | :closed_lock_with_key: | GET | `/v5/pre-upgrade/execution/list` | -| [getPreUpgradeClosedPnl()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1803) | :closed_lock_with_key: | GET | `/v5/pre-upgrade/position/closed-pnl` | -| [getPreUpgradeTransactions()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1817) | :closed_lock_with_key: | GET | `/v5/pre-upgrade/account/transaction-log` | -| [getPreUpgradeOptionDeliveryRecord()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1834) | :closed_lock_with_key: | GET | `/v5/pre-upgrade/asset/delivery-record` | -| [getPreUpgradeUSDCSessionSettlements()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1848) | :closed_lock_with_key: | GET | `/v5/pre-upgrade/asset/settlement-record` | -| [getWalletBalance()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1869) | :closed_lock_with_key: | GET | `/v5/account/wallet-balance` | -| [getTransferableAmount()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1880) | :closed_lock_with_key: | GET | `/v5/account/withdrawal` | -| [getAccountInstrumentsInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1897) | :closed_lock_with_key: | GET | `/v5/account/instruments-info` | -| [upgradeToUnifiedAccount()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1908) | :closed_lock_with_key: | POST | `/v5/account/upgrade-to-uta` | -| [getBorrowHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1919) | :closed_lock_with_key: | GET | `/v5/account/borrow-history` | -| [repayLiability()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1940) | :closed_lock_with_key: | POST | `/v5/account/quick-repayment` | -| [manualRepay()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1965) | :closed_lock_with_key: | POST | `/v5/account/repay` | -| [setCollateralCoin()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1974) | :closed_lock_with_key: | POST | `/v5/account/set-collateral-switch` | -| [batchSetCollateralCoin()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1980) | :closed_lock_with_key: | POST | `/v5/account/set-collateral-switch-batch` | -| [getCollateralInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1990) | :closed_lock_with_key: | GET | `/v5/account/collateral-info` | -| [getCoinGreeks()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1999) | :closed_lock_with_key: | GET | `/v5/asset/coin-greeks` | -| [getFeeRate()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2012) | :closed_lock_with_key: | GET | `/v5/account/fee-rate` | -| [getAccountInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2021) | :closed_lock_with_key: | GET | `/v5/account/info` | -| [getDCPInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2034) | :closed_lock_with_key: | GET | `/v5/account/query-dcp-info` | -| [getTransactionLog()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2041) | :closed_lock_with_key: | GET | `/v5/account/transaction-log` | -| [getClassicTransactionLogs()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2052) | :closed_lock_with_key: | GET | `/v5/account/contract-transaction-log` | -| [getSMPGroup()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2063) | :closed_lock_with_key: | GET | `/v5/account/smp-group` | -| [setMarginMode()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2076) | :closed_lock_with_key: | POST | `/v5/account/set-margin-mode` | -| [setSpotHedging()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2093) | :closed_lock_with_key: | POST | `/v5/account/set-hedging-mode` | -| [setLimitPriceAction()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2106) | :closed_lock_with_key: | POST | `/v5/account/set-limit-px-action` | -| [getLimitPriceAction()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2117) | :closed_lock_with_key: | GET | `/v5/account/user-setting-config` | -| [setDeltaNeutralMode()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2125) | :closed_lock_with_key: | POST | `/v5/account/set-delta-mode` | -| [setMMP()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2134) | :closed_lock_with_key: | POST | `/v5/account/mmp-modify` | -| [resetMMP()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2141) | :closed_lock_with_key: | POST | `/v5/account/mmp-reset` | -| [getMMPState()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2148) | :closed_lock_with_key: | GET | `/v5/account/mmp-state` | -| [getOptionAssetInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2158) | :closed_lock_with_key: | GET | `/v5/account/option-asset-info` | -| [getPayInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2168) | :closed_lock_with_key: | GET | `/v5/account/pay-info` | -| [getTradeInfoForAnalysis()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2178) | :closed_lock_with_key: | GET | `/v5/account/trade-info-for-analysis` | -| [getAssetOverview()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2198) | :closed_lock_with_key: | GET | `/v5/asset/asset-overview` | -| [getPortfolioMarginInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2208) | :closed_lock_with_key: | GET | `/v5/asset/portfolio-margin` | -| [getTotalMembersAssets()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2218) | :closed_lock_with_key: | GET | `/v5/asset/total-members-assets` | -| [getFundingAccountTransactionHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2230) | :closed_lock_with_key: | GET | `/v5/asset/fundinghistory` | -| [getDeliveryRecord()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2246) | :closed_lock_with_key: | GET | `/v5/asset/delivery-record` | -| [getSettlementRecords()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2257) | :closed_lock_with_key: | GET | `/v5/asset/settlement-record` | -| [getCoinExchangeRecords()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2270) | :closed_lock_with_key: | GET | `/v5/asset/exchange/order-record` | -| [getCoinInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2285) | :closed_lock_with_key: | GET | `/v5/asset/coin/query-info` | -| [getSubUID()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2299) | :closed_lock_with_key: | GET | `/v5/asset/transfer/query-sub-member-list` | -| [getAssetInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2314) | :closed_lock_with_key: | GET | `/v5/asset/transfer/query-asset-info` | -| [getAllCoinsBalance()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2325) | :closed_lock_with_key: | GET | `/v5/asset/transfer/query-account-coins-balance` | -| [getCoinBalance()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2339) | :closed_lock_with_key: | GET | `/v5/asset/transfer/query-account-coin-balance` | -| [getWithdrawableAmount()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2353) | :closed_lock_with_key: | GET | `/v5/asset/withdraw/withdrawable-amount` | -| [getTransferableCoinList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2362) | :closed_lock_with_key: | GET | `/v5/asset/transfer/query-transfer-coin-list` | -| [createInternalTransfer()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2378) | :closed_lock_with_key: | POST | `/v5/asset/transfer/inter-transfer` | -| [getInternalTransferRecords()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2397) | :closed_lock_with_key: | GET | `/v5/asset/transfer/query-inter-transfer-list` | -| [enableUniversalTransferForSubUIDs()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2417) | :closed_lock_with_key: | POST | `/v5/asset/transfer/save-transfer-sub-member` | -| [createUniversalTransfer()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2428) | :closed_lock_with_key: | POST | `/v5/asset/transfer/universal-transfer` | -| [getUniversalTransferRecords()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2440) | :closed_lock_with_key: | GET | `/v5/asset/transfer/query-universal-transfer-list` | -| [getAllowedDepositCoinInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2453) | :closed_lock_with_key: | GET | `/v5/asset/deposit/query-allowed-list` | -| [setDepositAccount()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2468) | :closed_lock_with_key: | POST | `/v5/asset/deposit/deposit-to-account` | -| [getDepositRecords()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2484) | :closed_lock_with_key: | GET | `/v5/asset/deposit/query-record` | -| [getSubAccountDepositRecords()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2499) | :closed_lock_with_key: | GET | `/v5/asset/deposit/query-sub-member-record` | -| [getInternalDepositRecords()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2515) | :closed_lock_with_key: | GET | `/v5/asset/deposit/query-internal-record` | -| [getMasterDepositAddress()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2527) | :closed_lock_with_key: | GET | `/v5/asset/deposit/query-address` | -| [getSubDepositAddress()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2545) | :closed_lock_with_key: | GET | `/v5/asset/deposit/query-sub-member-address` | -| [querySubMemberAddress()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2570) | :closed_lock_with_key: | GET | `/v5/asset/deposit/query-sub-member-address` | -| [getWithdrawalRecords()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2590) | :closed_lock_with_key: | GET | `/v5/asset/withdraw/query-record` | -| [getWithdrawalAddressList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2602) | :closed_lock_with_key: | GET | `/v5/asset/withdraw/query-address` | -| [getExchangeEntities()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2616) | :closed_lock_with_key: | GET | `/v5/asset/withdraw/vasp/list` | -| [submitDepositOriginatorInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2626) | :closed_lock_with_key: | POST | `/v5/asset/travel-rule/deposit/submit` | -| [submitWithdrawal()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2641) | :closed_lock_with_key: | POST | `/v5/asset/withdraw/create` | -| [cancelWithdrawal()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2652) | :closed_lock_with_key: | POST | `/v5/asset/withdraw/cancel` | -| [getConvertCoins()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2661) | :closed_lock_with_key: | GET | `/v5/asset/exchange/query-coin-list` | -| [requestConvertQuote()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2672) | :closed_lock_with_key: | POST | `/v5/asset/exchange/quote-apply` | -| [confirmConvertQuote()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2681) | :closed_lock_with_key: | POST | `/v5/asset/exchange/convert-execute` | -| [getConvertStatus()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2693) | :closed_lock_with_key: | GET | `/v5/asset/exchange/convert-result-query` | -| [getConvertHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2712) | :closed_lock_with_key: | GET | `/v5/asset/exchange/query-convert-history` | -| [getSmallBalanceList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2729) | :closed_lock_with_key: | GET | `/v5/asset/covert/small-balance-list` | -| [getFiatTradingPairList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2743) | :closed_lock_with_key: | GET | `/v5/fiat/query-coin-list` | -| [createSubMember()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2761) | :closed_lock_with_key: | POST | `/v5/user/create-sub-member` | -| [createSubUIDAPIKey()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2773) | :closed_lock_with_key: | POST | `/v5/user/create-sub-api` | -| [getSubUIDList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2782) | :closed_lock_with_key: | GET | `/v5/user/query-sub-members` | -| [getSubUIDListUnlimited()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2791) | :closed_lock_with_key: | GET | `/v5/user/submembers` | -| [setSubUIDFrozenState()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2809) | :closed_lock_with_key: | POST | `/v5/user/frozen-sub-member` | -| [getQueryApiKey()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2824) | :closed_lock_with_key: | GET | `/v5/user/query-api` | -| [getSubAccountAllApiKeys()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2831) | :closed_lock_with_key: | GET | `/v5/user/sub-apikeys` | -| [getUIDWalletType()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2840) | :closed_lock_with_key: | GET | `/v5/user/get-member-type` | -| [updateMasterApiKey()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2859) | :closed_lock_with_key: | POST | `/v5/user/update-api` | -| [updateSubApiKey()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2873) | :closed_lock_with_key: | POST | `/v5/user/update-sub-api` | -| [deleteSubMember()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2886) | :closed_lock_with_key: | POST | `/v5/user/del-submember` | -| [deleteMasterApiKey()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2901) | :closed_lock_with_key: | POST | `/v5/user/delete-api` | -| [deleteSubApiKey()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2915) | :closed_lock_with_key: | POST | `/v5/user/delete-sub-api` | -| [createTaxBatchExport()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2930) | :closed_lock_with_key: | POST | `/v5/fht/compliance/tax/private/batch_create` | -| [getTaxBatchExport()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2942) | :closed_lock_with_key: | GET | `/v5/fht/compliance/tax/private/batch_query` | -| [getAffiliateUserList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2965) | :closed_lock_with_key: | GET | `/v5/affiliate/aff-user-list` | -| [getAffiliateSubAffiliateList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2983) | :closed_lock_with_key: | GET | `/v5/affiliate/affiliate-sub-list` | -| [getAffiliateUserInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2999) | :closed_lock_with_key: | GET | `/v5/user/aff-customer-info` | -| [getFriendReferrals()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3011) | :closed_lock_with_key: | GET | `/v5/user/invitation/referrals` | -| [getReferralCode()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3020) | :closed_lock_with_key: | GET | `/v5/user/invitation/code` | -| [signAgreement()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3036) | :closed_lock_with_key: | POST | `/v5/user/agreement` | -| [getAlphaTradeQuote()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3053) | :closed_lock_with_key: | POST | `/v5/alpha/trade/quote` | -| [executeAlphaTradePurchase()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3064) | :closed_lock_with_key: | POST | `/v5/alpha/trade/purchase` | -| [executeAlphaTradeRedeem()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3075) | :closed_lock_with_key: | POST | `/v5/alpha/trade/redeem` | -| [getAlphaPayTokenList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3085) | :closed_lock_with_key: | POST | `/v5/alpha/trade/pay-token-list` | -| [getAlphaTradeOrderList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3095) | :closed_lock_with_key: | POST | `/v5/alpha/trade/order-list` | -| [getAlphaBizTokenList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3105) | :closed_lock_with_key: | POST | `/v5/alpha/trade/biz-token-list` | -| [getAlphaBizTokenPriceList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3115) | :closed_lock_with_key: | POST | `/v5/alpha/trade/biz-token-price-list` | -| [getAlphaBizTokenDetails()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3125) | :closed_lock_with_key: | POST | `/v5/alpha/trade/biz-token-details` | -| [getAlphaAssetList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3135) | :closed_lock_with_key: | POST | `/v5/alpha/trade/asset-list` | -| [getAlphaAssetDetail()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3143) | :closed_lock_with_key: | POST | `/v5/alpha/trade/asset-detail` | -| [getAlphaPredictionEngineStatus()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3159) | :closed_lock_with_key: | GET | `/v5/alpha/prediction/engine-status` | -| [getAlphaPredictionPayTokenList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3169) | :closed_lock_with_key: | GET | `/v5/alpha/prediction/pay-token-list` | -| [getAlphaPredictionEventDetail()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3179) | :closed_lock_with_key: | POST | `/v5/alpha/prediction/event-detail` | -| [getAlphaPredictionOrderEstimate()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3189) | :closed_lock_with_key: | POST | `/v5/alpha/prediction/order-estimate` | -| [executeAlphaPredictionBuy()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3199) | :closed_lock_with_key: | POST | `/v5/alpha/prediction/buy` | -| [executeAlphaPredictionSell()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3209) | :closed_lock_with_key: | POST | `/v5/alpha/prediction/sell` | -| [getAlphaPredictionOrderList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3219) | :closed_lock_with_key: | POST | `/v5/alpha/prediction/order-list` | -| [getAlphaPredictionOrderBook()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3229) | :closed_lock_with_key: | POST | `/v5/alpha/prediction/order-book` | -| [getAlphaPredictionTokenPrice()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3239) | :closed_lock_with_key: | POST | `/v5/alpha/prediction/token-price` | -| [getAlphaPredictionPriceHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3249) | :closed_lock_with_key: | POST | `/v5/alpha/prediction/price-history` | -| [getAlphaPredictionPositionList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3259) | :closed_lock_with_key: | POST | `/v5/alpha/prediction/position-list` | -| [getAlphaPredictionPositionHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3269) | :closed_lock_with_key: | POST | `/v5/alpha/prediction/position-history` | -| [getAlphaPredictionPortfolioSummary()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3279) | :closed_lock_with_key: | POST | `/v5/alpha/prediction/portfolio-summary` | -| [getAlphaPredictionSideMarketList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3289) | :closed_lock_with_key: | POST | `/v5/alpha/prediction/side-market-list` | -| [getAlphaPredictionSportsMatchList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3299) | :closed_lock_with_key: | POST | `/v5/alpha/prediction/sports/match-list` | -| [getAlphaPredictionSportsTimelineStages()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3309) | :closed_lock_with_key: | GET | `/v5/alpha/prediction/sports/timeline-stages` | -| [getAlphaPredictionSportsGroupStageDetail()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3322) | :closed_lock_with_key: | POST | `/v5/alpha/prediction/sports/group-stage-detail` | -| [getAlphaLPPoolList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3341) | :closed_lock_with_key: | POST | `/v5/alpha/lp/pool-list` | -| [getAlphaLPPoolInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3351) | :closed_lock_with_key: | POST | `/v5/alpha/lp/pool-info` | -| [executeAlphaLPStake()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3361) | :closed_lock_with_key: | POST | `/v5/alpha/lp/stake` | -| [executeAlphaLPRedeem()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3371) | :closed_lock_with_key: | POST | `/v5/alpha/lp/redeem` | -| [getAlphaLPOrderList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3381) | :closed_lock_with_key: | POST | `/v5/alpha/lp/order-list` | -| [getAlphaLPPayTokenList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3391) | :closed_lock_with_key: | POST | `/v5/alpha/lp/pay-token-list` | -| [getAlphaLPPayTokenPrice()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3401) | :closed_lock_with_key: | POST | `/v5/alpha/lp/pay-token-price` | -| [getAlphaLPPositionList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3411) | :closed_lock_with_key: | POST | `/v5/alpha/lp/position-list` | -| [getVIPMarginData()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3431) | | GET | `/v5/spot-margin-trade/data` | -| [getHistoricalInterestRate()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3442) | :closed_lock_with_key: | GET | `/v5/spot-margin-trade/interest-rate-history` | -| [getSpotMarginCurrencyData()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3467) | :closed_lock_with_key: | GET | `/v5/spot-margin-trade/currency-data` | -| [toggleSpotMarginTrade()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3479) | :closed_lock_with_key: | POST | `/v5/spot-margin-trade/switch-mode` | -| [setSpotMarginLeverage()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3490) | :closed_lock_with_key: | POST | `/v5/spot-margin-trade/set-leverage` | -| [setSpotMarginLeverageV2()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3498) | :closed_lock_with_key: | POST | `/v5/spot-margin-trade/set-leverage` | -| [getSpotMarginState()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3509) | :closed_lock_with_key: | GET | `/v5/spot-margin-trade/state` | -| [manualBorrow()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3516) | :closed_lock_with_key: | POST | `/v5/account/borrow` | -| [getMaxBorrowableAmount()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3531) | :closed_lock_with_key: | GET | `/v5/spot-margin-trade/max-borrowable` | -| [getPositionTiers()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3540) | :closed_lock_with_key: | GET | `/v5/spot-margin-trade/position-tiers` | -| [getCoinState()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3551) | :closed_lock_with_key: | GET | `/v5/spot-margin-trade/coinstate` | -| [getAvailableAmountToRepay()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3562) | :closed_lock_with_key: | GET | `/v5/spot-margin-trade/repayment-available-amount` | -| [manualRepayWithoutConversion()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3581) | :closed_lock_with_key: | POST | `/v5/account/no-convert-repay` | -| [getAutoRepayMode()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3594) | :closed_lock_with_key: | GET | `/v5/spot-margin-trade/get-auto-repay-mode` | -| [setAutoRepayMode()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3610) | :closed_lock_with_key: | POST | `/v5/spot-margin-trade/set-auto-repay-mode` | -| [getSpotMarginLiability()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3622) | :closed_lock_with_key: | GET | `/v5/spot-margin-trade/liability` | -| [submitFixedRateBorrow()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3631) | :closed_lock_with_key: | POST | `/v5/spot-margin-trade/fixedborrow` | -| [getFixedRateBorrowOrderInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3640) | :closed_lock_with_key: | GET | `/v5/spot-margin-trade/fixedborrow-order-info` | -| [getFixedRateBorrowContractInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3657) | :closed_lock_with_key: | GET | `/v5/spot-margin-trade/fixedborrow-contract-info` | -| [getFixedRateBorrowOrderQuote()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3674) | :closed_lock_with_key: | GET | `/v5/spot-margin-trade/fixedborrow-order-quote` | -| [renewFixedRateBorrow()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3686) | :closed_lock_with_key: | POST | `/v5/spot-margin-trade/fixedborrow-renew` | -| [getFlexibleAvailableInventory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3692) | :closed_lock_with_key: | GET | `/v5/spot-margin-trade/flexible-available-inventory` | -| [getFixedRateAvailableInventory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3701) | :closed_lock_with_key: | GET | `/v5/spot-margin-trade/fixed-available-inventory` | -| [getSpotMarginCoinInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3719) | :closed_lock_with_key: | GET | `/v5/spot-cross-margin-trade/pledge-token` | -| [getSpotMarginBorrowableCoinInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3736) | :closed_lock_with_key: | GET | `/v5/spot-cross-margin-trade/borrow-token` | -| [getSpotMarginInterestAndQuota()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3753) | :closed_lock_with_key: | GET | `/v5/spot-cross-margin-trade/loan-info` | -| [getSpotMarginLoanAccountInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3771) | :closed_lock_with_key: | GET | `/v5/spot-cross-margin-trade/account` | -| [spotMarginBorrow()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3795) | :closed_lock_with_key: | POST | `/v5/spot-cross-margin-trade/loan` | -| [spotMarginRepay()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3806) | :closed_lock_with_key: | POST | `/v5/spot-cross-margin-trade/repay` | -| [getSpotMarginBorrowOrderDetail()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3821) | :closed_lock_with_key: | GET | `/v5/spot-cross-margin-trade/orders` | -| [getSpotMarginRepaymentOrderDetail()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3850) | :closed_lock_with_key: | GET | `/v5/spot-cross-margin-trade/repay-history` | -| [toggleSpotCrossMarginTrade()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3879) | :closed_lock_with_key: | POST | `/v5/spot-cross-margin-trade/switch` | -| [getCollateralCoins()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3899) | | GET | `/v5/crypto-loan/collateral-data` | -| [getBorrowableCoins()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3916) | | GET | `/v5/crypto-loan/loanable-data` | -| [getAccountBorrowCollateralLimit()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3934) | :closed_lock_with_key: | GET | `/v5/crypto-loan/borrowable-collateralisable-number` | -| [borrowCryptoLoan()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3954) | :closed_lock_with_key: | POST | `/v5/crypto-loan/borrow` | -| [repayCryptoLoan()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3975) | :closed_lock_with_key: | POST | `/v5/crypto-loan/repay` | -| [getUnpaidLoanOrders()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3991) | :closed_lock_with_key: | GET | `/v5/crypto-loan/ongoing-orders` | -| [getRepaymentHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4012) | :closed_lock_with_key: | GET | `/v5/crypto-loan/repayment-history` | -| [getCompletedLoanOrderHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4032) | :closed_lock_with_key: | GET | `/v5/crypto-loan/borrow-history` | -| [getMaxAllowedReductionCollateralAmount()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4051) | :closed_lock_with_key: | GET | `/v5/crypto-loan/max-collateral-amount` | -| [adjustCollateralAmount()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4070) | :closed_lock_with_key: | POST | `/v5/crypto-loan/adjust-ltv` | -| [getLoanLTVAdjustmentHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4094) | :closed_lock_with_key: | GET | `/v5/crypto-loan/adjustment-history` | -| [getLoanBorrowableCoins()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4115) | | GET | `/v5/crypto-loan-common/loanable-data` | -| [getLoanCollateralCoins()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4127) | | GET | `/v5/crypto-loan-common/collateral-data` | -| [getMaxCollateralAmount()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4137) | :closed_lock_with_key: | GET | `/v5/crypto-loan-common/max-collateral-amount` | -| [getMaxLoanAmount()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4156) | :closed_lock_with_key: | POST | `/v5/crypto-loan-common/max-loan` | -| [updateCollateralAmount()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4166) | :closed_lock_with_key: | POST | `/v5/crypto-loan-common/adjust-ltv` | -| [getCollateralAdjustmentHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4177) | :closed_lock_with_key: | GET | `/v5/crypto-loan-common/adjustment-history` | -| [getCryptoLoanPosition()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4192) | :closed_lock_with_key: | GET | `/v5/crypto-loan-common/position` | -| [borrowFlexible()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4209) | :closed_lock_with_key: | POST | `/v5/crypto-loan-flexible/borrow` | -| [repayFlexible()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4220) | :closed_lock_with_key: | POST | `/v5/crypto-loan-flexible/repay` | -| [repayCollateralFlexible()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4230) | :closed_lock_with_key: | POST | `/v5/crypto-loan-flexible/repay-collateral` | -| [getOngoingFlexibleLoans()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4244) | :closed_lock_with_key: | GET | `/v5/crypto-loan-flexible/ongoing-coin` | -| [getBorrowHistoryFlexible()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4256) | :closed_lock_with_key: | GET | `/v5/crypto-loan-flexible/borrow-history` | -| [getRepaymentHistoryFlexible()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4269) | :closed_lock_with_key: | GET | `/v5/crypto-loan-flexible/repayment-history` | -| [getFlexibleLoanAvailableInventory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4283) | :closed_lock_with_key: | GET | `/v5/crypto-loan-flexible/available-inventory` | -| [getSupplyOrderQuoteFixed()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4303) | | GET | `/v5/crypto-loan-fixed/supply-order-quote` | -| [getBorrowOrderQuoteFixed()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4316) | | GET | `/v5/crypto-loan-fixed/borrow-order-quote` | -| [createBorrowOrderFixed()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4329) | :closed_lock_with_key: | POST | `/v5/crypto-loan-fixed/borrow` | -| [createSupplyOrderFixed()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4342) | :closed_lock_with_key: | POST | `/v5/crypto-loan-fixed/supply` | -| [cancelBorrowOrderFixed()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4352) | :closed_lock_with_key: | POST | `/v5/crypto-loan-fixed/borrow-order-cancel` | -| [cancelSupplyOrderFixed()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4366) | :closed_lock_with_key: | POST | `/v5/crypto-loan-fixed/supply-order-cancel` | -| [getBorrowContractInfoFixed()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4379) | :closed_lock_with_key: | GET | `/v5/crypto-loan-fixed/borrow-contract-info` | -| [getSupplyContractInfoFixed()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4397) | :closed_lock_with_key: | GET | `/v5/crypto-loan-fixed/supply-contract-info` | -| [getBorrowOrderInfoFixed()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4415) | :closed_lock_with_key: | GET | `/v5/crypto-loan-fixed/borrow-order-info` | -| [getSupplyOrderInfoFixed()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4428) | :closed_lock_with_key: | GET | `/v5/crypto-loan-fixed/supply-order-info` | -| [repayFixed()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4442) | :closed_lock_with_key: | POST | `/v5/crypto-loan-fixed/fully-repay` | -| [repayCollateralFixed()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4453) | :closed_lock_with_key: | POST | `/v5/crypto-loan-flexible/repay-collateral` | -| [getRepaymentHistoryFixed()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4466) | :closed_lock_with_key: | GET | `/v5/crypto-loan-fixed/repayment-history` | -| [renewBorrowOrderFixed()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4483) | :closed_lock_with_key: | POST | `/v5/crypto-loan-fixed/renew` | -| [getRenewOrderInfoFixed()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4496) | :closed_lock_with_key: | GET | `/v5/crypto-loan-fixed/renew-info` | -| [getFixedLoanAvailableInventory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4505) | :closed_lock_with_key: | GET | `/v5/crypto-loan-fixed/available-inventory` | -| [getInstitutionalLendingProductInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4520) | | GET | `/v5/ins-loan/product-infos` | -| [getInstitutionalLendingCoinDeltaAmount()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4532) | :closed_lock_with_key: | GET | `/v5/ins-loan/coin-delta-amount` | -| [getInstitutionalLendingDelayLiquidationStatus()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4541) | :closed_lock_with_key: | GET | `/v5/ins-loan/delay-liq-status` | -| [getInstitutionalLendingMarginCoinInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4551) | | GET | `/v5/ins-loan/ensure-tokens` | -| [getInstitutionalLendingMarginCoinInfoWithConversionRate()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4560) | | GET | `/v5/ins-loan/ensure-tokens-convert` | -| [getInstitutionalLendingLoanOrders()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4569) | :closed_lock_with_key: | GET | `/v5/ins-loan/loan-order` | -| [getInstitutionalLendingRepayOrders()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4581) | :closed_lock_with_key: | GET | `/v5/ins-loan/repaid-history` | -| [getInstitutionalLendingLTV()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4593) | :closed_lock_with_key: | GET | `/v5/ins-loan/ltv` | -| [getInstitutionalLendingLTVWithLadderConversionRate()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4602) | :closed_lock_with_key: | GET | `/v5/ins-loan/ltv-convert` | -| [bindOrUnbindUID()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4617) | :closed_lock_with_key: | POST | `/v5/ins-loan/association-uid` | -| [repayInstitutionalLoan()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4637) | :closed_lock_with_key: | POST | `/v5/ins-loan/repay-loan` | -| [getExchangeBrokerEarnings()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4658) | :closed_lock_with_key: | GET | `/v5/broker/earnings-info` | -| [getExchangeBrokerAccountInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4671) | :closed_lock_with_key: | GET | `/v5/broker/account-info` | -| [getBrokerSubAccountDeposits()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4687) | :closed_lock_with_key: | GET | `/v5/broker/asset/query-sub-member-deposit-record` | -| [getBrokerVoucherSpec()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4702) | :closed_lock_with_key: | POST | `/v5/broker/award/info` | -| [issueBrokerVoucher()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4714) | :closed_lock_with_key: | POST | `/v5/broker/award/distribute-award` | -| [getBrokerIssuedVoucher()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4726) | :closed_lock_with_key: | POST | `/v5/broker/award/distribution-record` | -| [setBrokerRateLimit()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4743) | :closed_lock_with_key: | POST | `/v5/broker/apilimit/set` | -| [getBrokerRateLimitCap()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4762) | :closed_lock_with_key: | GET | `/v5/broker/apilimit/query-cap` | -| [getAllBrokerRateLimits()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4780) | :closed_lock_with_key: | GET | `/v5/broker/apilimit/query-all` | -| [getEarnProduct()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4800) | | GET | `/v5/earn/product` | -| [getFlexibleSavingAutoSavings()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4811) | :closed_lock_with_key: | GET | `/v5/earn/flexible-saving/auto-savings` | -| [setFlexibleSavingAutoSavings()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4822) | :closed_lock_with_key: | POST | `/v5/earn/flexible-saving/auto-savings` | -| [getEarnCouponList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4832) | :closed_lock_with_key: | GET | `/v5/earn/coupons` | -| [getRWAProductList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4842) | | GET | `/v5/earn/rwa/product` | -| [placeRWAOrder()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4852) | :closed_lock_with_key: | POST | `/v5/earn/rwa/place-order` | -| [getRWAPositionList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4861) | :closed_lock_with_key: | GET | `/v5/earn/rwa/position` | -| [getRWAOrderList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4870) | :closed_lock_with_key: | GET | `/v5/earn/rwa/order` | -| [getRWANavChart()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4880) | | GET | `/v5/earn/rwa/nav-chart` | -| [getHoldToEarnAirdropProducts()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4891) | | GET | `/v5/earn/hold-to-earn/product` | -| [getAdvanceEarnProduct()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4902) | | GET | `/v5/earn/advance/product` | -| [getLiquidityMiningProduct()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4913) | | GET | `/v5/earn/liquidity-mining/product` | -| [reinvestLiquidityMining()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4926) | :closed_lock_with_key: | POST | `/v5/earn/liquidity-mining/reinvest` | -| [getFixedTermEarnProduct()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4937) | | GET | `/v5/earn/fixed-term/product` | -| [getAdvanceEarnProductExtraInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4949) | | GET | `/v5/earn/advance/product-extra-info` | -| [submitAdvanceEarnPlaceOrder()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4960) | :closed_lock_with_key: | POST | `/v5/earn/advance/place-order` | -| [getAdvanceEarnPosition()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4971) | :closed_lock_with_key: | GET | `/v5/earn/advance/position` | -| [getAdvanceEarnOrder()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4982) | :closed_lock_with_key: | GET | `/v5/earn/advance/order` | -| [submitFixedTermEarnOrder()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4993) | :closed_lock_with_key: | POST | `/v5/earn/fixed-term/place-order` | -| [redeemFixedTermEarn()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5004) | :closed_lock_with_key: | POST | `/v5/earn/fixed-term/redeem` | -| [getFixedTermEarnPosition()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5015) | :closed_lock_with_key: | GET | `/v5/earn/fixed-term/position` | -| [getFixedTermEarnOrder()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5026) | :closed_lock_with_key: | GET | `/v5/earn/fixed-term/order` | -| [setFixedTermEarnAutoInvest()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5037) | :closed_lock_with_key: | POST | `/v5/earn/fixed-term/position/auto-invest` | -| [submitStakeRedeem()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5053) | :closed_lock_with_key: | POST | `/v5/earn/place-order` | -| [getEarnOrderHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5072) | :closed_lock_with_key: | GET | `/v5/earn/order` | -| [getEarnPosition()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5090) | :closed_lock_with_key: | GET | `/v5/earn/position` | -| [modifyEarnPosition()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5103) | :closed_lock_with_key: | POST | `/v5/earn/position/modify` | -| [getEarnYieldHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5116) | :closed_lock_with_key: | GET | `/v5/earn/yield` | -| [getHoldToEarnAirdropYieldHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5130) | :closed_lock_with_key: | GET | `/v5/earn/hold-to-earn/yield-history` | -| [getEarnHourlyYieldHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5141) | :closed_lock_with_key: | GET | `/v5/earn/hourly-yield` | -| [getEarnAprHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5155) | | GET | `/v5/earn/apr-history` | -| [getEarnTokenProduct()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5165) | | GET | `/v5/earn/token/product` | -| [submitEarnTokenOrder()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5174) | :closed_lock_with_key: | POST | `/v5/earn/token/place-order` | -| [getEarnTokenOrders()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5183) | :closed_lock_with_key: | GET | `/v5/earn/token/order` | -| [getEarnTokenPosition()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5195) | :closed_lock_with_key: | GET | `/v5/earn/token/position` | -| [getEarnTokenDailyYield()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5204) | :closed_lock_with_key: | GET | `/v5/earn/token/yield` | -| [getEarnTokenHourlyYield()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5216) | :closed_lock_with_key: | GET | `/v5/earn/token/hourly-yield` | -| [getEarnTokenHistoryApr()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5228) | | GET | `/v5/earn/token/history-apr` | -| [getPwmInvestmentPlanList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5243) | :closed_lock_with_key: | GET | `/v5/earn/pwm/investment-plan/list` | -| [getPwmInvestmentPlanDetail()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5252) | :closed_lock_with_key: | GET | `/v5/earn/pwm/investment-plan/detail` | -| [getPwmPendingInvestmentPlanDetail()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5261) | :closed_lock_with_key: | GET | `/v5/earn/pwm/investment-plan/new-plan` | -| [claimPwmWithdrawableFunds()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5270) | :closed_lock_with_key: | POST | `/v5/earn/pwm/investment-plan/claim` | -| [getPwmInvestmentPlanAssetTrend()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5279) | :closed_lock_with_key: | GET | `/v5/earn/pwm/investment-plan/asset-trend` | -| [getPwmFundHistoricalNav()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5288) | :closed_lock_with_key: | GET | `/v5/earn/pwm/investment-plan/fund-nav` | -| [subscribePwmInvestmentPlan()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5297) | :closed_lock_with_key: | POST | `/v5/earn/pwm/investment-plan/subscribe` | -| [investMorePwmInvestmentPlan()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5306) | :closed_lock_with_key: | POST | `/v5/earn/pwm/investment-plan/invest-more` | -| [redeemPwmInvestmentPlan()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5315) | :closed_lock_with_key: | POST | `/v5/earn/pwm/investment-plan/redeem` | -| [getPwmInvestmentPlanOrders()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5324) | :closed_lock_with_key: | GET | `/v5/earn/pwm/investment-plan/order` | -| [getPwmSubscribableProductInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5333) | | GET | `/v5/earn/pwm/customize-plan/product` | -| [createPwmCustomizeInvestmentPlan()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5342) | :closed_lock_with_key: | POST | `/v5/earn/pwm/customize-plan/create` | -| [getPwmAllFunds()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5357) | :closed_lock_with_key: | GET | `/v5/earn/pwm/asset-manager/all-funds` | -| [settlePwmFundProfit()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5366) | :closed_lock_with_key: | POST | `/v5/earn/pwm/asset-manager/settle-profit` | -| [createPwmFund()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5375) | :closed_lock_with_key: | POST | `/v5/earn/pwm/asset-manager/create-fund` | -| [createPwmAssetManagerInvestmentPlan()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5384) | :closed_lock_with_key: | POST | `/v5/earn/pwm/asset-manager/create-investment-plan` | -| [getPwmAssetManagerInvestmentPlans()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5398) | :closed_lock_with_key: | GET | `/v5/earn/pwm/asset-manager/get-investment-plan` | -| [managePwmAssetManagerInvestmentPlan()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5410) | :closed_lock_with_key: | POST | `/v5/earn/pwm/asset-manager/manage-investment-plan` | -| [getPwmAllFundOrders()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5424) | :closed_lock_with_key: | GET | `/v5/earn/pwm/asset-manager/all-order` | -| [managePwmFundOrder()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5433) | :closed_lock_with_key: | POST | `/v5/earn/pwm/asset-manager/manage-order` | -| [createPwmFundSubAccount()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5442) | :closed_lock_with_key: | POST | `/v5/earn/pwm/asset-manager/create-sub-account` | -| [pwmFundTransfer()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5454) | :closed_lock_with_key: | POST | `/v5/earn/pwm/fund-transfer` | -| [getPwmFundTransferRecords()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5463) | :closed_lock_with_key: | GET | `/v5/earn/pwm/query-fund-transfer-result` | -| [queryCardAssetRecords()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5478) | :closed_lock_with_key: | POST | `/v5/card/transaction/query-asset-records` | -| [queryCardPointsBalance()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5487) | :closed_lock_with_key: | POST | `/v5/card/reward/points/balance` | -| [queryCardPointsRecords()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5494) | :closed_lock_with_key: | POST | `/v5/card/reward/points/records` | -| [queryCardPointsTier()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5503) | :closed_lock_with_key: | POST | `/v5/card/reward/points/tier` | -| [queryCardMallItemList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5510) | :closed_lock_with_key: | POST | `/v5/card/reward/mall/item/list` | -| [queryCardPointCashbackDetail()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5519) | :closed_lock_with_key: | POST | `/v5/card/reward/point/cashback/detail` | -| [createRFQ()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5535) | :closed_lock_with_key: | POST | `/v5/rfq/create-rfq` | -| [getRFQConfig()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5546) | :closed_lock_with_key: | GET | `/v5/rfq/config` | -| [cancelRFQ()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5555) | :closed_lock_with_key: | POST | `/v5/rfq/cancel-rfq` | -| [cancelAllRFQ()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5565) | :closed_lock_with_key: | POST | `/v5/rfq/cancel-all-rfq` | -| [createRFQQuote()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5574) | :closed_lock_with_key: | POST | `/v5/rfq/create-quote` | -| [executeRFQQuote()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5585) | :closed_lock_with_key: | POST | `/v5/rfq/execute-quote` | -| [cancelRFQQuote()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5596) | :closed_lock_with_key: | POST | `/v5/rfq/cancel-quote` | -| [cancelAllRFQQuotes()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5606) | :closed_lock_with_key: | POST | `/v5/rfq/cancel-all-quotes` | -| [getRFQRealtimeInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5620) | :closed_lock_with_key: | GET | `/v5/rfq/rfq-realtime` | -| [getRFQHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5632) | :closed_lock_with_key: | GET | `/v5/rfq/rfq-list` | -| [getRFQRealtimeQuote()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5646) | :closed_lock_with_key: | GET | `/v5/rfq/quote-realtime` | -| [getRFQHistoryQuote()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5661) | :closed_lock_with_key: | GET | `/v5/rfq/quote-list` | -| [getRFQTrades()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5674) | :closed_lock_with_key: | GET | `/v5/rfq/trade-list` | -| [getRFQPublicTrades()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5687) | :closed_lock_with_key: | GET | `/v5/rfq/public-trades` | -| [acceptNonLPQuote()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5703) | :closed_lock_with_key: | POST | `/v5/rfq/accept-other-quote` | -| [getRFQDetails()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5709) | :closed_lock_with_key: | GET | `/v5/rfq/rfq-detail-list` | -| [getP2PAccountCoinsBalance()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5734) | :closed_lock_with_key: | GET | `/v5/asset/transfer/query-account-coins-balance` | -| [getP2POnlineAds()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5751) | :closed_lock_with_key: | POST | `/v5/p2p/item/online` | -| [createP2PAd()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5760) | :closed_lock_with_key: | POST | `/v5/p2p/item/create` | -| [cancelP2PAd()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5769) | :closed_lock_with_key: | POST | `/v5/p2p/item/cancel` | -| [updateP2PAd()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5783) | :closed_lock_with_key: | POST | `/v5/p2p/item/update` | -| [getP2PPersonalAds()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5793) | :closed_lock_with_key: | POST | `/v5/p2p/item/personal/list` | -| [getP2PAdDetail()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5802) | :closed_lock_with_key: | POST | `/v5/p2p/item/info` | -| [getP2POrders()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5817) | :closed_lock_with_key: | POST | `/v5/p2p/order/simplifyList` | -| [getP2POrderDetail()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5827) | :closed_lock_with_key: | POST | `/v5/p2p/order/info` | -| [getP2PPendingOrders()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5836) | :closed_lock_with_key: | POST | `/v5/p2p/order/pending/simplifyList` | -| [markP2POrderAsPaid()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5845) | :closed_lock_with_key: | POST | `/v5/p2p/order/pay` | -| [releaseP2POrder()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5854) | :closed_lock_with_key: | POST | `/v5/p2p/order/finish` | -| [reviewP2PSellerCancelOrderApply()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5866) | :closed_lock_with_key: | POST | `/v5/p2p/order/buyer/examine/sellerCancelOrderApply` | -| [sendP2POrderMessage()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5878) | :closed_lock_with_key: | POST | `/v5/p2p/order/message/send` | -| [getP2PChatSessions()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5893) | :closed_lock_with_key: | POST | `/v5/p2p/chat/session/list_v1` | -| [getP2PChatSessionId()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5903) | :closed_lock_with_key: | POST | `/v5/p2p/chat/session/getSessionId` | -| [sendP2PChatMessage()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5939) | :closed_lock_with_key: | POST | `/v5/p2p/chat/message/send_v1` | -| [getP2PChatMessages()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5951) | :closed_lock_with_key: | POST | `/v5/p2p/chat/message/listpage_v1` | -| [getP2POrderMessages()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5960) | :closed_lock_with_key: | POST | `/v5/p2p/order/message/listpage` | -| [getP2PUserInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5974) | :closed_lock_with_key: | POST | `/v5/p2p/user/personal/info` | -| [getP2PCounterpartyUserInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5981) | :closed_lock_with_key: | POST | `/v5/p2p/user/order/personal/info` | -| [getP2PUserPayments()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5990) | :closed_lock_with_key: | POST | `/v5/p2p/user/payment/list` | -| [setApiRateLimit()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6010) | :closed_lock_with_key: | POST | `/v5/apilimit/set` | -| [queryApiRateLimit()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6039) | :closed_lock_with_key: | GET | `/v5/apilimit/query` | -| [getRateLimitCap()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6058) | :closed_lock_with_key: | GET | `/v5/apilimit/query-cap` | -| [getAllRateLimits()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6077) | :closed_lock_with_key: | GET | `/v5/apilimit/query-all` | -| [getLaunchpoolProjectList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6100) | | GET | `/v5/spot-x/launchpool/project/list` | -| [getLaunchpoolUserActivityLog()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6106) | :closed_lock_with_key: | POST | `/v5/spot-x/launchpool/user/activity-log` | -| [getLaunchpoolCurrentStaking()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6112) | :closed_lock_with_key: | GET | `/v5/spot-x/launchpool/user/current-staking` | -| [getLaunchpoolUserHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6118) | :closed_lock_with_key: | POST | `/v5/spot-x/launchpool/user/history` | -| [getPuzzleProjectList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6124) | | GET | `/v5/spot-x/puzzle/project/list` | -| [getTokenSplashProjectList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6130) | | GET | `/v5/spot-x/token-splash/project/list` | -| [getTokenSplashUserActivityParams()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6136) | :closed_lock_with_key: | GET | `/v5/spot-x/token-splash/user/activity-params` | -| [getEventInstrumentsInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6159) | | GET | `/v5/event/instruments-info` | -| [getEventOrderbook()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6170) | | GET | `/v5/event/orderbook` | -| [getEventOrderHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6181) | :closed_lock_with_key: | GET | `/v5/event/order-list` | -| [getEventActiveOrders()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6192) | :closed_lock_with_key: | GET | `/v5/event/order-realtime` | -| [getEventPositionInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6203) | :closed_lock_with_key: | GET | `/v5/event/positions` | -| [getEventTradeHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6214) | :closed_lock_with_key: | GET | `/v5/event/trades` | -| [getEventSettlementRecords()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6225) | :closed_lock_with_key: | GET | `/v5/event/settlements` | -| [submitEventQuote()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6236) | :closed_lock_with_key: | POST | `/v5/event/quotes` | -| [cancelEventQuote()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6247) | :closed_lock_with_key: | POST | `/v5/event/cancel` | +| [getSystemStatus()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L730) | :closed_lock_with_key: | GET | `/v5/system/status` | +| [getServerTime()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L747) | | GET | `/v5/market/time` | +| [requestDemoTradingFunds()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L759) | :closed_lock_with_key: | POST | `/v5/account/demo-apply-money` | +| [createDemoAccount()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L772) | :closed_lock_with_key: | POST | `/v5/user/create-demo-member` | +| [getSpreadInstrumentsInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L785) | | GET | `/v5/spread/instrument` | +| [getSpreadOrderbook()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L797) | | GET | `/v5/spread/orderbook` | +| [getSpreadTickers()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L807) | | GET | `/v5/spread/tickers` | +| [getSpreadRecentTrades()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L818) | | GET | `/v5/spread/recent-trade` | +| [getSpreadMaxQty()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L830) | :closed_lock_with_key: | GET | `/v5/spread/max-qty` | +| [submitSpreadOrder()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L839) | :closed_lock_with_key: | POST | `/v5/spread/order/create` | +| [amendSpreadOrder()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L852) | :closed_lock_with_key: | POST | `/v5/spread/order/amend` | +| [cancelSpreadOrder()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L864) | :closed_lock_with_key: | POST | `/v5/spread/order/cancel` | +| [cancelAllSpreadOrders()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L882) | :closed_lock_with_key: | POST | `/v5/spread/order/cancel-all` | +| [getSpreadOpenOrders()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L901) | :closed_lock_with_key: | GET | `/v5/spread/order/realtime` | +| [getSpreadOrderHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L918) | :closed_lock_with_key: | GET | `/v5/spread/order/history` | +| [getSpreadTradeHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L934) | :closed_lock_with_key: | GET | `/v5/spread/execution/list` | +| [getKline()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L954) | | GET | `/v5/market/kline` | +| [getMarkPriceKline()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L971) | | GET | `/v5/market/mark-price-kline` | +| [getIndexPriceKline()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L986) | | GET | `/v5/market/index-price-kline` | +| [getPremiumIndexPriceKline()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1001) | | GET | `/v5/market/premium-index-price-kline` | +| [getInstrumentsInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1017) | | GET | `/v5/market/instruments-info` | +| [getInstrumentSummary()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1031) | | GET | `/v5/market/instrument-summary` | +| [getOrderbook()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1042) | | GET | `/v5/market/orderbook` | +| [getFullDepthOrderbook()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1048) | | GET | `/v5/market/full_orderbook` | +| [getRPIOrderbook()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1062) | | GET | `/v5/market/rpi_orderbook` | +| [getTickers()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1068) | | GET | `/v5/market/tickers` | +| [getFundingRateHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1106) | | GET | `/v5/market/funding/history` | +| [getPublicTradingHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1121) | | GET | `/v5/market/recent-trade` | +| [getOpenInterest()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1134) | | GET | `/v5/market/open-interest` | +| [getHistoricalVolatility()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1144) | | GET | `/v5/market/historical-volatility` | +| [getInsurance()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1155) | | GET | `/v5/market/insurance` | +| [getRiskLimit()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1166) | | GET | `/v5/market/risk-limit` | +| [getOptionDeliveryPrice()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1181) | | GET | `/v5/market/delivery-price` | +| [getDeliveryPrice()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1194) | | GET | `/v5/market/delivery-price` | +| [getNewDeliveryPrice()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1210) | | GET | `/v5/market/new-delivery-price` | +| [getLongShortRatio()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1226) | | GET | `/v5/market/account-ratio` | +| [getIndexPriceComponents()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1236) | | GET | `/v5/market/index-price-components` | +| [getOrderPriceLimit()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1242) | | GET | `/v5/market/price-limit` | +| [getADLAlert()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1256) | | GET | `/v5/market/adlAlert` | +| [getFeeGroupStructure()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1269) | | GET | `/v5/market/fee-group-info` | +| [getOptionBaseCoins()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1278) | | GET | `/v5/market/option-base-coins` | +| [submitOrder()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1290) | :closed_lock_with_key: | POST | `/v5/order/create` | +| [amendOrder()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1296) | :closed_lock_with_key: | POST | `/v5/order/amend` | +| [cancelOrder()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1302) | :closed_lock_with_key: | POST | `/v5/order/cancel` | +| [getActiveOrders()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1311) | :closed_lock_with_key: | GET | `/v5/order/realtime` | +| [cancelAllOrders()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1317) | :closed_lock_with_key: | POST | `/v5/order/cancel-all` | +| [getHistoricOrders()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1330) | :closed_lock_with_key: | GET | `/v5/order/history` | +| [getExecutionList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1342) | :closed_lock_with_key: | GET | `/v5/execution/list` | +| [batchSubmitOrders()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1360) | :closed_lock_with_key: | POST | `/v5/order/create-batch` | +| [batchAmendOrders()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1385) | :closed_lock_with_key: | POST | `/v5/order/amend-batch` | +| [batchCancelOrders()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1410) | :closed_lock_with_key: | POST | `/v5/order/cancel-batch` | +| [getSpotBorrowCheck()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1432) | :closed_lock_with_key: | GET | `/v5/order/spot-borrow-check` | +| [setDisconnectCancelAllWindow()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1453) | :closed_lock_with_key: | POST | `/v5/order/disconnected-cancel-all` | +| [setDisconnectCancelAllWindowV2()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1471) | :closed_lock_with_key: | POST | `/v5/order/disconnected-cancel-all` | +| [preCheckOrder()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1486) | :closed_lock_with_key: | POST | `/v5/order/pre-check` | +| [createStrategyOrder()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1503) | :closed_lock_with_key: | POST | `/v5/strategy/create` | +| [getStrategyList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1514) | :closed_lock_with_key: | GET | `/v5/strategy/list` | +| [getStrategyOrderList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1525) | :closed_lock_with_key: | GET | `/v5/strategy/order-list` | +| [stopStrategy()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1536) | :closed_lock_with_key: | POST | `/v5/strategy/stop` | +| [getPositionInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1561) | :closed_lock_with_key: | GET | `/v5/position/list` | +| [getFuturesLeverage()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1573) | :closed_lock_with_key: | GET | `/v5/position/symbol-info` | +| [setLeverage()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1588) | :closed_lock_with_key: | POST | `/v5/position/set-leverage` | +| [switchIsolatedMargin()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1601) | :closed_lock_with_key: | POST | `/v5/position/switch-isolated` | +| [setTPSLMode()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1615) | :closed_lock_with_key: | POST | `/v5/position/set-tpsl-mode` | +| [switchPositionMode()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1630) | :closed_lock_with_key: | POST | `/v5/position/switch-mode` | +| [setRiskLimit()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1644) | :closed_lock_with_key: | POST | `/v5/position/set-risk-limit` | +| [setTradingStop()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1659) | :closed_lock_with_key: | POST | `/v5/position/trading-stop` | +| [setAutoAddMargin()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1670) | :closed_lock_with_key: | POST | `/v5/position/set-auto-add-margin` | +| [addOrReduceMargin()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1682) | :closed_lock_with_key: | POST | `/v5/position/add-margin` | +| [getClosedPnL()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1694) | :closed_lock_with_key: | GET | `/v5/position/closed-pnl` | +| [getClosedOptionsPositions()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1708) | :closed_lock_with_key: | GET | `/v5/position/get-closed-positions` | +| [movePosition()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1733) | :closed_lock_with_key: | POST | `/v5/position/move-positions` | +| [getMovePositionHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1744) | :closed_lock_with_key: | GET | `/v5/position/move-history` | +| [confirmNewRiskLimit()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1763) | :closed_lock_with_key: | POST | `/v5/position/confirm-pending-mmr` | +| [getPreUpgradeOrderHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1783) | :closed_lock_with_key: | GET | `/v5/pre-upgrade/order/history` | +| [getPreUpgradeTradeHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1798) | :closed_lock_with_key: | GET | `/v5/pre-upgrade/execution/list` | +| [getPreUpgradeClosedPnl()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1809) | :closed_lock_with_key: | GET | `/v5/pre-upgrade/position/closed-pnl` | +| [getPreUpgradeTransactions()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1823) | :closed_lock_with_key: | GET | `/v5/pre-upgrade/account/transaction-log` | +| [getPreUpgradeOptionDeliveryRecord()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1840) | :closed_lock_with_key: | GET | `/v5/pre-upgrade/asset/delivery-record` | +| [getPreUpgradeUSDCSessionSettlements()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1854) | :closed_lock_with_key: | GET | `/v5/pre-upgrade/asset/settlement-record` | +| [getWalletBalance()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1875) | :closed_lock_with_key: | GET | `/v5/account/wallet-balance` | +| [getTransferableAmount()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1886) | :closed_lock_with_key: | GET | `/v5/account/withdrawal` | +| [getAccountInstrumentsInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1903) | :closed_lock_with_key: | GET | `/v5/account/instruments-info` | +| [upgradeToUnifiedAccount()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1914) | :closed_lock_with_key: | POST | `/v5/account/upgrade-to-uta` | +| [getBorrowHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1925) | :closed_lock_with_key: | GET | `/v5/account/borrow-history` | +| [repayLiability()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1946) | :closed_lock_with_key: | POST | `/v5/account/quick-repayment` | +| [manualRepay()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1971) | :closed_lock_with_key: | POST | `/v5/account/repay` | +| [setCollateralCoin()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1980) | :closed_lock_with_key: | POST | `/v5/account/set-collateral-switch` | +| [batchSetCollateralCoin()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1986) | :closed_lock_with_key: | POST | `/v5/account/set-collateral-switch-batch` | +| [getCollateralInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L1996) | :closed_lock_with_key: | GET | `/v5/account/collateral-info` | +| [getCoinGreeks()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2005) | :closed_lock_with_key: | GET | `/v5/asset/coin-greeks` | +| [getFeeRate()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2018) | :closed_lock_with_key: | GET | `/v5/account/fee-rate` | +| [getAccountInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2027) | :closed_lock_with_key: | GET | `/v5/account/info` | +| [getDCPInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2040) | :closed_lock_with_key: | GET | `/v5/account/query-dcp-info` | +| [getTransactionLog()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2047) | :closed_lock_with_key: | GET | `/v5/account/transaction-log` | +| [getClassicTransactionLogs()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2058) | :closed_lock_with_key: | GET | `/v5/account/contract-transaction-log` | +| [getSMPGroup()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2069) | :closed_lock_with_key: | GET | `/v5/account/smp-group` | +| [setMarginMode()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2082) | :closed_lock_with_key: | POST | `/v5/account/set-margin-mode` | +| [setSpotHedging()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2099) | :closed_lock_with_key: | POST | `/v5/account/set-hedging-mode` | +| [setLimitPriceAction()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2112) | :closed_lock_with_key: | POST | `/v5/account/set-limit-px-action` | +| [getLimitPriceAction()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2123) | :closed_lock_with_key: | GET | `/v5/account/user-setting-config` | +| [setDeltaNeutralMode()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2131) | :closed_lock_with_key: | POST | `/v5/account/set-delta-mode` | +| [setMMP()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2140) | :closed_lock_with_key: | POST | `/v5/account/mmp-modify` | +| [resetMMP()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2147) | :closed_lock_with_key: | POST | `/v5/account/mmp-reset` | +| [getMMPState()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2154) | :closed_lock_with_key: | GET | `/v5/account/mmp-state` | +| [getOptionAssetInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2164) | :closed_lock_with_key: | GET | `/v5/account/option-asset-info` | +| [getPayInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2174) | :closed_lock_with_key: | GET | `/v5/account/pay-info` | +| [getTradeInfoForAnalysis()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2184) | :closed_lock_with_key: | GET | `/v5/account/trade-info-for-analysis` | +| [getAssetOverview()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2204) | :closed_lock_with_key: | GET | `/v5/asset/asset-overview` | +| [getPortfolioMarginInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2214) | :closed_lock_with_key: | GET | `/v5/asset/portfolio-margin` | +| [getTotalMembersAssets()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2224) | :closed_lock_with_key: | GET | `/v5/asset/total-members-assets` | +| [getFundingAccountTransactionHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2236) | :closed_lock_with_key: | GET | `/v5/asset/fundinghistory` | +| [getDeliveryRecord()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2252) | :closed_lock_with_key: | GET | `/v5/asset/delivery-record` | +| [getSettlementRecords()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2263) | :closed_lock_with_key: | GET | `/v5/asset/settlement-record` | +| [getCoinExchangeRecords()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2276) | :closed_lock_with_key: | GET | `/v5/asset/exchange/order-record` | +| [getCoinInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2291) | :closed_lock_with_key: | GET | `/v5/asset/coin/query-info` | +| [getSubUID()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2305) | :closed_lock_with_key: | GET | `/v5/asset/transfer/query-sub-member-list` | +| [getAssetInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2320) | :closed_lock_with_key: | GET | `/v5/asset/transfer/query-asset-info` | +| [getAllCoinsBalance()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2331) | :closed_lock_with_key: | GET | `/v5/asset/transfer/query-account-coins-balance` | +| [getCoinBalance()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2345) | :closed_lock_with_key: | GET | `/v5/asset/transfer/query-account-coin-balance` | +| [getWithdrawableAmount()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2359) | :closed_lock_with_key: | GET | `/v5/asset/withdraw/withdrawable-amount` | +| [getTransferableCoinList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2368) | :closed_lock_with_key: | GET | `/v5/asset/transfer/query-transfer-coin-list` | +| [createInternalTransfer()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2384) | :closed_lock_with_key: | POST | `/v5/asset/transfer/inter-transfer` | +| [getInternalTransferRecords()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2403) | :closed_lock_with_key: | GET | `/v5/asset/transfer/query-inter-transfer-list` | +| [enableUniversalTransferForSubUIDs()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2423) | :closed_lock_with_key: | POST | `/v5/asset/transfer/save-transfer-sub-member` | +| [createUniversalTransfer()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2434) | :closed_lock_with_key: | POST | `/v5/asset/transfer/universal-transfer` | +| [getUniversalTransferRecords()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2446) | :closed_lock_with_key: | GET | `/v5/asset/transfer/query-universal-transfer-list` | +| [getAllowedDepositCoinInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2459) | :closed_lock_with_key: | GET | `/v5/asset/deposit/query-allowed-list` | +| [setDepositAccount()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2474) | :closed_lock_with_key: | POST | `/v5/asset/deposit/deposit-to-account` | +| [getDepositRecords()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2490) | :closed_lock_with_key: | GET | `/v5/asset/deposit/query-record` | +| [getSubAccountDepositRecords()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2505) | :closed_lock_with_key: | GET | `/v5/asset/deposit/query-sub-member-record` | +| [getInternalDepositRecords()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2521) | :closed_lock_with_key: | GET | `/v5/asset/deposit/query-internal-record` | +| [getMasterDepositAddress()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2533) | :closed_lock_with_key: | GET | `/v5/asset/deposit/query-address` | +| [getSubDepositAddress()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2551) | :closed_lock_with_key: | GET | `/v5/asset/deposit/query-sub-member-address` | +| [querySubMemberAddress()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2576) | :closed_lock_with_key: | GET | `/v5/asset/deposit/query-sub-member-address` | +| [getWithdrawalRecords()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2596) | :closed_lock_with_key: | GET | `/v5/asset/withdraw/query-record` | +| [getWithdrawalAddressList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2608) | :closed_lock_with_key: | GET | `/v5/asset/withdraw/query-address` | +| [getExchangeEntities()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2622) | :closed_lock_with_key: | GET | `/v5/asset/withdraw/vasp/list` | +| [submitDepositOriginatorInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2632) | :closed_lock_with_key: | POST | `/v5/asset/travel-rule/deposit/submit` | +| [submitWithdrawal()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2647) | :closed_lock_with_key: | POST | `/v5/asset/withdraw/create` | +| [cancelWithdrawal()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2658) | :closed_lock_with_key: | POST | `/v5/asset/withdraw/cancel` | +| [getConvertCoins()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2667) | :closed_lock_with_key: | GET | `/v5/asset/exchange/query-coin-list` | +| [requestConvertQuote()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2678) | :closed_lock_with_key: | POST | `/v5/asset/exchange/quote-apply` | +| [confirmConvertQuote()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2687) | :closed_lock_with_key: | POST | `/v5/asset/exchange/convert-execute` | +| [getConvertStatus()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2699) | :closed_lock_with_key: | GET | `/v5/asset/exchange/convert-result-query` | +| [getConvertHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2718) | :closed_lock_with_key: | GET | `/v5/asset/exchange/query-convert-history` | +| [getSmallBalanceList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2735) | :closed_lock_with_key: | GET | `/v5/asset/covert/small-balance-list` | +| [getFiatTradingPairList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2749) | :closed_lock_with_key: | GET | `/v5/fiat/query-coin-list` | +| [createSubMember()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2767) | :closed_lock_with_key: | POST | `/v5/user/create-sub-member` | +| [createSubUIDAPIKey()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2779) | :closed_lock_with_key: | POST | `/v5/user/create-sub-api` | +| [getSubUIDList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2788) | :closed_lock_with_key: | GET | `/v5/user/query-sub-members` | +| [getSubUIDListUnlimited()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2797) | :closed_lock_with_key: | GET | `/v5/user/submembers` | +| [setSubUIDFrozenState()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2815) | :closed_lock_with_key: | POST | `/v5/user/frozen-sub-member` | +| [getQueryApiKey()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2830) | :closed_lock_with_key: | GET | `/v5/user/query-api` | +| [getSubAccountAllApiKeys()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2837) | :closed_lock_with_key: | GET | `/v5/user/sub-apikeys` | +| [getUIDWalletType()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2846) | :closed_lock_with_key: | GET | `/v5/user/get-member-type` | +| [updateMasterApiKey()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2865) | :closed_lock_with_key: | POST | `/v5/user/update-api` | +| [updateSubApiKey()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2879) | :closed_lock_with_key: | POST | `/v5/user/update-sub-api` | +| [deleteSubMember()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2892) | :closed_lock_with_key: | POST | `/v5/user/del-submember` | +| [deleteMasterApiKey()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2907) | :closed_lock_with_key: | POST | `/v5/user/delete-api` | +| [deleteSubApiKey()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2921) | :closed_lock_with_key: | POST | `/v5/user/delete-sub-api` | +| [createTaxBatchExport()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2936) | :closed_lock_with_key: | POST | `/v5/fht/compliance/tax/private/batch_create` | +| [getTaxBatchExport()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2948) | :closed_lock_with_key: | GET | `/v5/fht/compliance/tax/private/batch_query` | +| [getAffiliateUserList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2971) | :closed_lock_with_key: | GET | `/v5/affiliate/aff-user-list` | +| [getAffiliateSubAffiliateList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L2989) | :closed_lock_with_key: | GET | `/v5/affiliate/affiliate-sub-list` | +| [getAffiliateUserInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3005) | :closed_lock_with_key: | GET | `/v5/user/aff-customer-info` | +| [getFriendReferrals()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3017) | :closed_lock_with_key: | GET | `/v5/user/invitation/referrals` | +| [getReferralCode()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3026) | :closed_lock_with_key: | GET | `/v5/user/invitation/code` | +| [getReferralCommissionRecords()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3038) | :closed_lock_with_key: | POST | `/v5/referral/commission/records` | +| [getReferralCampaignRewards()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3051) | :closed_lock_with_key: | POST | `/v5/referral/campaign/rewards` | +| [getReferralUserIdentityProfile()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3066) | :closed_lock_with_key: | POST | `/v5/referral/user/identity-profile` | +| [getReferralUserInvitations()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3079) | :closed_lock_with_key: | POST | `/v5/referral/user/invitations` | +| [signAgreement()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3097) | :closed_lock_with_key: | POST | `/v5/user/agreement` | +| [getAlphaTradeQuote()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3114) | :closed_lock_with_key: | POST | `/v5/alpha/trade/quote` | +| [executeAlphaTradePurchase()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3125) | :closed_lock_with_key: | POST | `/v5/alpha/trade/purchase` | +| [executeAlphaTradeRedeem()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3136) | :closed_lock_with_key: | POST | `/v5/alpha/trade/redeem` | +| [getAlphaPayTokenList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3146) | :closed_lock_with_key: | POST | `/v5/alpha/trade/pay-token-list` | +| [getAlphaTradeOrderList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3156) | :closed_lock_with_key: | POST | `/v5/alpha/trade/order-list` | +| [getAlphaBizTokenList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3166) | :closed_lock_with_key: | POST | `/v5/alpha/trade/biz-token-list` | +| [getAlphaBizTokenPriceList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3176) | :closed_lock_with_key: | POST | `/v5/alpha/trade/biz-token-price-list` | +| [getAlphaBizTokenDetails()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3186) | :closed_lock_with_key: | POST | `/v5/alpha/trade/biz-token-details` | +| [getAlphaAssetList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3196) | :closed_lock_with_key: | POST | `/v5/alpha/trade/asset-list` | +| [getAlphaAssetDetail()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3204) | :closed_lock_with_key: | POST | `/v5/alpha/trade/asset-detail` | +| [getAlphaPredictionEngineStatus()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3220) | :closed_lock_with_key: | GET | `/v5/alpha/prediction/engine-status` | +| [getAlphaPredictionPayTokenList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3230) | :closed_lock_with_key: | GET | `/v5/alpha/prediction/pay-token-list` | +| [getAlphaPredictionEventDetail()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3240) | :closed_lock_with_key: | POST | `/v5/alpha/prediction/event-detail` | +| [getAlphaPredictionOrderEstimate()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3250) | :closed_lock_with_key: | POST | `/v5/alpha/prediction/order-estimate` | +| [executeAlphaPredictionBuy()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3260) | :closed_lock_with_key: | POST | `/v5/alpha/prediction/buy` | +| [executeAlphaPredictionSell()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3270) | :closed_lock_with_key: | POST | `/v5/alpha/prediction/sell` | +| [getAlphaPredictionOrderList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3280) | :closed_lock_with_key: | POST | `/v5/alpha/prediction/order-list` | +| [getAlphaPredictionOrderBook()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3290) | :closed_lock_with_key: | POST | `/v5/alpha/prediction/order-book` | +| [getAlphaPredictionTokenPrice()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3300) | :closed_lock_with_key: | POST | `/v5/alpha/prediction/token-price` | +| [getAlphaPredictionPriceHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3310) | :closed_lock_with_key: | POST | `/v5/alpha/prediction/price-history` | +| [getAlphaPredictionPositionList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3320) | :closed_lock_with_key: | POST | `/v5/alpha/prediction/position-list` | +| [getAlphaPredictionPositionHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3330) | :closed_lock_with_key: | POST | `/v5/alpha/prediction/position-history` | +| [getAlphaPredictionPortfolioSummary()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3340) | :closed_lock_with_key: | POST | `/v5/alpha/prediction/portfolio-summary` | +| [getAlphaPredictionSideMarketList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3350) | :closed_lock_with_key: | POST | `/v5/alpha/prediction/side-market-list` | +| [getAlphaPredictionSportsMatchList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3360) | :closed_lock_with_key: | POST | `/v5/alpha/prediction/sports/match-list` | +| [getAlphaPredictionSportsTimelineStages()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3370) | :closed_lock_with_key: | GET | `/v5/alpha/prediction/sports/timeline-stages` | +| [getAlphaPredictionSportsGroupStageDetail()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3383) | :closed_lock_with_key: | POST | `/v5/alpha/prediction/sports/group-stage-detail` | +| [getAlphaLPPoolList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3402) | :closed_lock_with_key: | POST | `/v5/alpha/lp/pool-list` | +| [getAlphaLPPoolInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3412) | :closed_lock_with_key: | POST | `/v5/alpha/lp/pool-info` | +| [executeAlphaLPStake()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3422) | :closed_lock_with_key: | POST | `/v5/alpha/lp/stake` | +| [executeAlphaLPRedeem()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3432) | :closed_lock_with_key: | POST | `/v5/alpha/lp/redeem` | +| [getAlphaLPOrderList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3442) | :closed_lock_with_key: | POST | `/v5/alpha/lp/order-list` | +| [getAlphaLPPayTokenList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3452) | :closed_lock_with_key: | POST | `/v5/alpha/lp/pay-token-list` | +| [getAlphaLPPayTokenPrice()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3462) | :closed_lock_with_key: | POST | `/v5/alpha/lp/pay-token-price` | +| [getAlphaLPPositionList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3472) | :closed_lock_with_key: | POST | `/v5/alpha/lp/position-list` | +| [getVIPMarginData()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3492) | | GET | `/v5/spot-margin-trade/data` | +| [getHistoricalInterestRate()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3503) | :closed_lock_with_key: | GET | `/v5/spot-margin-trade/interest-rate-history` | +| [getSpotMarginCurrencyData()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3528) | :closed_lock_with_key: | GET | `/v5/spot-margin-trade/currency-data` | +| [toggleSpotMarginTrade()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3540) | :closed_lock_with_key: | POST | `/v5/spot-margin-trade/switch-mode` | +| [setSpotMarginLeverage()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3551) | :closed_lock_with_key: | POST | `/v5/spot-margin-trade/set-leverage` | +| [setSpotMarginLeverageV2()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3559) | :closed_lock_with_key: | POST | `/v5/spot-margin-trade/set-leverage` | +| [getSpotMarginState()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3570) | :closed_lock_with_key: | GET | `/v5/spot-margin-trade/state` | +| [manualBorrow()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3577) | :closed_lock_with_key: | POST | `/v5/account/borrow` | +| [getMaxBorrowableAmount()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3592) | :closed_lock_with_key: | GET | `/v5/spot-margin-trade/max-borrowable` | +| [getPositionTiers()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3601) | :closed_lock_with_key: | GET | `/v5/spot-margin-trade/position-tiers` | +| [getCoinState()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3612) | :closed_lock_with_key: | GET | `/v5/spot-margin-trade/coinstate` | +| [getAvailableAmountToRepay()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3623) | :closed_lock_with_key: | GET | `/v5/spot-margin-trade/repayment-available-amount` | +| [manualRepayWithoutConversion()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3642) | :closed_lock_with_key: | POST | `/v5/account/no-convert-repay` | +| [getAutoRepayMode()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3655) | :closed_lock_with_key: | GET | `/v5/spot-margin-trade/get-auto-repay-mode` | +| [setAutoRepayMode()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3671) | :closed_lock_with_key: | POST | `/v5/spot-margin-trade/set-auto-repay-mode` | +| [getSpotMarginLiability()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3683) | :closed_lock_with_key: | GET | `/v5/spot-margin-trade/liability` | +| [submitFixedRateBorrow()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3692) | :closed_lock_with_key: | POST | `/v5/spot-margin-trade/fixedborrow` | +| [getFixedRateBorrowOrderInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3701) | :closed_lock_with_key: | GET | `/v5/spot-margin-trade/fixedborrow-order-info` | +| [getFixedRateBorrowContractInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3718) | :closed_lock_with_key: | GET | `/v5/spot-margin-trade/fixedborrow-contract-info` | +| [getFixedRateBorrowOrderQuote()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3735) | :closed_lock_with_key: | GET | `/v5/spot-margin-trade/fixedborrow-order-quote` | +| [renewFixedRateBorrow()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3747) | :closed_lock_with_key: | POST | `/v5/spot-margin-trade/fixedborrow-renew` | +| [getFlexibleAvailableInventory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3753) | :closed_lock_with_key: | GET | `/v5/spot-margin-trade/flexible-available-inventory` | +| [getFixedRateAvailableInventory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3762) | :closed_lock_with_key: | GET | `/v5/spot-margin-trade/fixed-available-inventory` | +| [getSpotMarginCoinInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3780) | :closed_lock_with_key: | GET | `/v5/spot-cross-margin-trade/pledge-token` | +| [getSpotMarginBorrowableCoinInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3797) | :closed_lock_with_key: | GET | `/v5/spot-cross-margin-trade/borrow-token` | +| [getSpotMarginInterestAndQuota()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3814) | :closed_lock_with_key: | GET | `/v5/spot-cross-margin-trade/loan-info` | +| [getSpotMarginLoanAccountInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3832) | :closed_lock_with_key: | GET | `/v5/spot-cross-margin-trade/account` | +| [spotMarginBorrow()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3856) | :closed_lock_with_key: | POST | `/v5/spot-cross-margin-trade/loan` | +| [spotMarginRepay()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3867) | :closed_lock_with_key: | POST | `/v5/spot-cross-margin-trade/repay` | +| [getSpotMarginBorrowOrderDetail()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3882) | :closed_lock_with_key: | GET | `/v5/spot-cross-margin-trade/orders` | +| [getSpotMarginRepaymentOrderDetail()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3911) | :closed_lock_with_key: | GET | `/v5/spot-cross-margin-trade/repay-history` | +| [toggleSpotCrossMarginTrade()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3940) | :closed_lock_with_key: | POST | `/v5/spot-cross-margin-trade/switch` | +| [getCollateralCoins()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3960) | | GET | `/v5/crypto-loan/collateral-data` | +| [getBorrowableCoins()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3977) | | GET | `/v5/crypto-loan/loanable-data` | +| [getAccountBorrowCollateralLimit()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L3995) | :closed_lock_with_key: | GET | `/v5/crypto-loan/borrowable-collateralisable-number` | +| [borrowCryptoLoan()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4015) | :closed_lock_with_key: | POST | `/v5/crypto-loan/borrow` | +| [repayCryptoLoan()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4036) | :closed_lock_with_key: | POST | `/v5/crypto-loan/repay` | +| [getUnpaidLoanOrders()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4052) | :closed_lock_with_key: | GET | `/v5/crypto-loan/ongoing-orders` | +| [getRepaymentHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4073) | :closed_lock_with_key: | GET | `/v5/crypto-loan/repayment-history` | +| [getCompletedLoanOrderHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4093) | :closed_lock_with_key: | GET | `/v5/crypto-loan/borrow-history` | +| [getMaxAllowedReductionCollateralAmount()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4112) | :closed_lock_with_key: | GET | `/v5/crypto-loan/max-collateral-amount` | +| [adjustCollateralAmount()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4131) | :closed_lock_with_key: | POST | `/v5/crypto-loan/adjust-ltv` | +| [getLoanLTVAdjustmentHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4155) | :closed_lock_with_key: | GET | `/v5/crypto-loan/adjustment-history` | +| [getLoanBorrowableCoins()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4176) | | GET | `/v5/crypto-loan-common/loanable-data` | +| [getLoanCollateralCoins()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4188) | | GET | `/v5/crypto-loan-common/collateral-data` | +| [getMaxCollateralAmount()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4198) | :closed_lock_with_key: | GET | `/v5/crypto-loan-common/max-collateral-amount` | +| [getMaxLoanAmount()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4217) | :closed_lock_with_key: | POST | `/v5/crypto-loan-common/max-loan` | +| [updateCollateralAmount()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4227) | :closed_lock_with_key: | POST | `/v5/crypto-loan-common/adjust-ltv` | +| [getCollateralAdjustmentHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4238) | :closed_lock_with_key: | GET | `/v5/crypto-loan-common/adjustment-history` | +| [getCryptoLoanPosition()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4253) | :closed_lock_with_key: | GET | `/v5/crypto-loan-common/position` | +| [borrowFlexible()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4270) | :closed_lock_with_key: | POST | `/v5/crypto-loan-flexible/borrow` | +| [repayFlexible()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4281) | :closed_lock_with_key: | POST | `/v5/crypto-loan-flexible/repay` | +| [repayCollateralFlexible()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4291) | :closed_lock_with_key: | POST | `/v5/crypto-loan-flexible/repay-collateral` | +| [getOngoingFlexibleLoans()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4305) | :closed_lock_with_key: | GET | `/v5/crypto-loan-flexible/ongoing-coin` | +| [getBorrowHistoryFlexible()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4317) | :closed_lock_with_key: | GET | `/v5/crypto-loan-flexible/borrow-history` | +| [getRepaymentHistoryFlexible()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4330) | :closed_lock_with_key: | GET | `/v5/crypto-loan-flexible/repayment-history` | +| [getFlexibleLoanAvailableInventory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4344) | :closed_lock_with_key: | GET | `/v5/crypto-loan-flexible/available-inventory` | +| [getSupplyOrderQuoteFixed()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4364) | | GET | `/v5/crypto-loan-fixed/supply-order-quote` | +| [getBorrowOrderQuoteFixed()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4377) | | GET | `/v5/crypto-loan-fixed/borrow-order-quote` | +| [createBorrowOrderFixed()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4390) | :closed_lock_with_key: | POST | `/v5/crypto-loan-fixed/borrow` | +| [createSupplyOrderFixed()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4403) | :closed_lock_with_key: | POST | `/v5/crypto-loan-fixed/supply` | +| [cancelBorrowOrderFixed()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4413) | :closed_lock_with_key: | POST | `/v5/crypto-loan-fixed/borrow-order-cancel` | +| [cancelSupplyOrderFixed()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4427) | :closed_lock_with_key: | POST | `/v5/crypto-loan-fixed/supply-order-cancel` | +| [getBorrowContractInfoFixed()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4440) | :closed_lock_with_key: | GET | `/v5/crypto-loan-fixed/borrow-contract-info` | +| [getSupplyContractInfoFixed()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4458) | :closed_lock_with_key: | GET | `/v5/crypto-loan-fixed/supply-contract-info` | +| [getBorrowOrderInfoFixed()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4476) | :closed_lock_with_key: | GET | `/v5/crypto-loan-fixed/borrow-order-info` | +| [getSupplyOrderInfoFixed()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4489) | :closed_lock_with_key: | GET | `/v5/crypto-loan-fixed/supply-order-info` | +| [repayFixed()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4503) | :closed_lock_with_key: | POST | `/v5/crypto-loan-fixed/fully-repay` | +| [repayCollateralFixed()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4514) | :closed_lock_with_key: | POST | `/v5/crypto-loan-flexible/repay-collateral` | +| [getRepaymentHistoryFixed()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4527) | :closed_lock_with_key: | GET | `/v5/crypto-loan-fixed/repayment-history` | +| [renewBorrowOrderFixed()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4544) | :closed_lock_with_key: | POST | `/v5/crypto-loan-fixed/renew` | +| [getRenewOrderInfoFixed()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4557) | :closed_lock_with_key: | GET | `/v5/crypto-loan-fixed/renew-info` | +| [getFixedLoanAvailableInventory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4566) | :closed_lock_with_key: | GET | `/v5/crypto-loan-fixed/available-inventory` | +| [getInstitutionalLendingProductInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4581) | | GET | `/v5/ins-loan/product-infos` | +| [getInstitutionalLendingCoinDeltaAmount()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4593) | :closed_lock_with_key: | GET | `/v5/ins-loan/coin-delta-amount` | +| [getInstitutionalLendingDelayLiquidationStatus()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4602) | :closed_lock_with_key: | GET | `/v5/ins-loan/delay-liq-status` | +| [getInstitutionalLendingMarginCoinInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4612) | | GET | `/v5/ins-loan/ensure-tokens` | +| [getInstitutionalLendingMarginCoinInfoWithConversionRate()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4621) | | GET | `/v5/ins-loan/ensure-tokens-convert` | +| [getInstitutionalLendingLoanOrders()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4630) | :closed_lock_with_key: | GET | `/v5/ins-loan/loan-order` | +| [getInstitutionalLendingRepayOrders()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4642) | :closed_lock_with_key: | GET | `/v5/ins-loan/repaid-history` | +| [getInstitutionalLendingLTV()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4654) | :closed_lock_with_key: | GET | `/v5/ins-loan/ltv` | +| [getInstitutionalLendingLTVWithLadderConversionRate()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4663) | :closed_lock_with_key: | GET | `/v5/ins-loan/ltv-convert` | +| [bindOrUnbindUID()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4678) | :closed_lock_with_key: | POST | `/v5/ins-loan/association-uid` | +| [repayInstitutionalLoan()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4698) | :closed_lock_with_key: | POST | `/v5/ins-loan/repay-loan` | +| [getExchangeBrokerEarnings()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4719) | :closed_lock_with_key: | GET | `/v5/broker/earnings-info` | +| [getExchangeBrokerAccountInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4732) | :closed_lock_with_key: | GET | `/v5/broker/account-info` | +| [getBrokerSubAccountDeposits()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4748) | :closed_lock_with_key: | GET | `/v5/broker/asset/query-sub-member-deposit-record` | +| [getBrokerVoucherSpec()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4763) | :closed_lock_with_key: | POST | `/v5/broker/award/info` | +| [issueBrokerVoucher()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4775) | :closed_lock_with_key: | POST | `/v5/broker/award/distribute-award` | +| [getBrokerIssuedVoucher()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4787) | :closed_lock_with_key: | POST | `/v5/broker/award/distribution-record` | +| [setBrokerRateLimit()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4804) | :closed_lock_with_key: | POST | `/v5/broker/apilimit/set` | +| [getBrokerRateLimitCap()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4823) | :closed_lock_with_key: | GET | `/v5/broker/apilimit/query-cap` | +| [getAllBrokerRateLimits()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4841) | :closed_lock_with_key: | GET | `/v5/broker/apilimit/query-all` | +| [getEarnProduct()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4861) | | GET | `/v5/earn/product` | +| [getFlexibleSavingAutoSavings()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4872) | :closed_lock_with_key: | GET | `/v5/earn/flexible-saving/auto-savings` | +| [setFlexibleSavingAutoSavings()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4883) | :closed_lock_with_key: | POST | `/v5/earn/flexible-saving/auto-savings` | +| [getEarnCouponList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4893) | :closed_lock_with_key: | GET | `/v5/earn/coupons` | +| [getRWAProductList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4903) | | GET | `/v5/earn/rwa/product` | +| [placeRWAOrder()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4913) | :closed_lock_with_key: | POST | `/v5/earn/rwa/place-order` | +| [getRWAPositionList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4922) | :closed_lock_with_key: | GET | `/v5/earn/rwa/position` | +| [getRWAOrderList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4931) | :closed_lock_with_key: | GET | `/v5/earn/rwa/order` | +| [getRWANavChart()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4941) | | GET | `/v5/earn/rwa/nav-chart` | +| [getHoldToEarnAirdropProducts()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4952) | | GET | `/v5/earn/hold-to-earn/product` | +| [getAdvanceEarnProduct()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4963) | | GET | `/v5/earn/advance/product` | +| [getLiquidityMiningProduct()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4974) | | GET | `/v5/earn/liquidity-mining/product` | +| [reinvestLiquidityMining()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4987) | :closed_lock_with_key: | POST | `/v5/earn/liquidity-mining/reinvest` | +| [getFixedTermEarnProduct()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L4998) | | GET | `/v5/earn/fixed-term/product` | +| [getAdvanceEarnProductExtraInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5010) | | GET | `/v5/earn/advance/product-extra-info` | +| [submitAdvanceEarnPlaceOrder()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5021) | :closed_lock_with_key: | POST | `/v5/earn/advance/place-order` | +| [getAdvanceEarnPosition()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5032) | :closed_lock_with_key: | GET | `/v5/earn/advance/position` | +| [getAdvanceEarnOrder()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5043) | :closed_lock_with_key: | GET | `/v5/earn/advance/order` | +| [submitFixedTermEarnOrder()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5054) | :closed_lock_with_key: | POST | `/v5/earn/fixed-term/place-order` | +| [redeemFixedTermEarn()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5065) | :closed_lock_with_key: | POST | `/v5/earn/fixed-term/redeem` | +| [getFixedTermEarnPosition()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5076) | :closed_lock_with_key: | GET | `/v5/earn/fixed-term/position` | +| [getFixedTermEarnOrder()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5087) | :closed_lock_with_key: | GET | `/v5/earn/fixed-term/order` | +| [setFixedTermEarnAutoInvest()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5098) | :closed_lock_with_key: | POST | `/v5/earn/fixed-term/position/auto-invest` | +| [submitStakeRedeem()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5114) | :closed_lock_with_key: | POST | `/v5/earn/place-order` | +| [getEarnOrderHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5133) | :closed_lock_with_key: | GET | `/v5/earn/order` | +| [getEarnPosition()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5151) | :closed_lock_with_key: | GET | `/v5/earn/position` | +| [modifyEarnPosition()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5164) | :closed_lock_with_key: | POST | `/v5/earn/position/modify` | +| [getEarnYieldHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5177) | :closed_lock_with_key: | GET | `/v5/earn/yield` | +| [getHoldToEarnAirdropYieldHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5191) | :closed_lock_with_key: | GET | `/v5/earn/hold-to-earn/yield-history` | +| [getEarnHourlyYieldHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5202) | :closed_lock_with_key: | GET | `/v5/earn/hourly-yield` | +| [getEarnAprHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5216) | | GET | `/v5/earn/apr-history` | +| [getEarnTokenProduct()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5226) | | GET | `/v5/earn/token/product` | +| [submitEarnTokenOrder()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5235) | :closed_lock_with_key: | POST | `/v5/earn/token/place-order` | +| [getEarnTokenOrders()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5244) | :closed_lock_with_key: | GET | `/v5/earn/token/order` | +| [getEarnTokenPosition()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5256) | :closed_lock_with_key: | GET | `/v5/earn/token/position` | +| [getEarnTokenDailyYield()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5265) | :closed_lock_with_key: | GET | `/v5/earn/token/yield` | +| [getEarnTokenHourlyYield()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5277) | :closed_lock_with_key: | GET | `/v5/earn/token/hourly-yield` | +| [getEarnTokenHistoryApr()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5289) | | GET | `/v5/earn/token/history-apr` | +| [getPwmInvestmentPlanList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5304) | :closed_lock_with_key: | GET | `/v5/earn/pwm/investment-plan/list` | +| [getPwmInvestmentPlanDetail()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5313) | :closed_lock_with_key: | GET | `/v5/earn/pwm/investment-plan/detail` | +| [getPwmPendingInvestmentPlanDetail()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5322) | :closed_lock_with_key: | GET | `/v5/earn/pwm/investment-plan/new-plan` | +| [claimPwmWithdrawableFunds()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5331) | :closed_lock_with_key: | POST | `/v5/earn/pwm/investment-plan/claim` | +| [getPwmInvestmentPlanAssetTrend()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5340) | :closed_lock_with_key: | GET | `/v5/earn/pwm/investment-plan/asset-trend` | +| [getPwmFundHistoricalNav()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5349) | :closed_lock_with_key: | GET | `/v5/earn/pwm/investment-plan/fund-nav` | +| [subscribePwmInvestmentPlan()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5358) | :closed_lock_with_key: | POST | `/v5/earn/pwm/investment-plan/subscribe` | +| [investMorePwmInvestmentPlan()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5367) | :closed_lock_with_key: | POST | `/v5/earn/pwm/investment-plan/invest-more` | +| [redeemPwmInvestmentPlan()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5376) | :closed_lock_with_key: | POST | `/v5/earn/pwm/investment-plan/redeem` | +| [getPwmInvestmentPlanOrders()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5385) | :closed_lock_with_key: | GET | `/v5/earn/pwm/investment-plan/order` | +| [getPwmSubscribableProductInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5394) | | GET | `/v5/earn/pwm/customize-plan/product` | +| [createPwmCustomizeInvestmentPlan()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5403) | :closed_lock_with_key: | POST | `/v5/earn/pwm/customize-plan/create` | +| [getPwmAllFunds()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5418) | :closed_lock_with_key: | GET | `/v5/earn/pwm/asset-manager/all-funds` | +| [settlePwmFundProfit()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5427) | :closed_lock_with_key: | POST | `/v5/earn/pwm/asset-manager/settle-profit` | +| [createPwmFund()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5436) | :closed_lock_with_key: | POST | `/v5/earn/pwm/asset-manager/create-fund` | +| [createPwmAssetManagerInvestmentPlan()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5445) | :closed_lock_with_key: | POST | `/v5/earn/pwm/asset-manager/create-investment-plan` | +| [getPwmAssetManagerInvestmentPlans()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5459) | :closed_lock_with_key: | GET | `/v5/earn/pwm/asset-manager/get-investment-plan` | +| [managePwmAssetManagerInvestmentPlan()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5471) | :closed_lock_with_key: | POST | `/v5/earn/pwm/asset-manager/manage-investment-plan` | +| [getPwmAllFundOrders()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5485) | :closed_lock_with_key: | GET | `/v5/earn/pwm/asset-manager/all-order` | +| [managePwmFundOrder()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5494) | :closed_lock_with_key: | POST | `/v5/earn/pwm/asset-manager/manage-order` | +| [createPwmFundSubAccount()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5503) | :closed_lock_with_key: | POST | `/v5/earn/pwm/asset-manager/create-sub-account` | +| [pwmFundTransfer()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5515) | :closed_lock_with_key: | POST | `/v5/earn/pwm/fund-transfer` | +| [getPwmFundTransferRecords()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5524) | :closed_lock_with_key: | GET | `/v5/earn/pwm/query-fund-transfer-result` | +| [queryCardAssetRecords()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5539) | :closed_lock_with_key: | POST | `/v5/card/transaction/query-asset-records` | +| [queryCardPointsBalance()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5548) | :closed_lock_with_key: | POST | `/v5/card/reward/points/balance` | +| [queryCardPointsRecords()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5555) | :closed_lock_with_key: | POST | `/v5/card/reward/points/records` | +| [queryCardPointsTier()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5564) | :closed_lock_with_key: | POST | `/v5/card/reward/points/tier` | +| [queryCardMallItemList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5571) | :closed_lock_with_key: | POST | `/v5/card/reward/mall/item/list` | +| [queryCardPointCashbackDetail()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5580) | :closed_lock_with_key: | POST | `/v5/card/reward/point/cashback/detail` | +| [createRFQ()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5596) | :closed_lock_with_key: | POST | `/v5/rfq/create-rfq` | +| [getRFQConfig()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5607) | :closed_lock_with_key: | GET | `/v5/rfq/config` | +| [cancelRFQ()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5616) | :closed_lock_with_key: | POST | `/v5/rfq/cancel-rfq` | +| [cancelAllRFQ()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5626) | :closed_lock_with_key: | POST | `/v5/rfq/cancel-all-rfq` | +| [createRFQQuote()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5635) | :closed_lock_with_key: | POST | `/v5/rfq/create-quote` | +| [executeRFQQuote()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5646) | :closed_lock_with_key: | POST | `/v5/rfq/execute-quote` | +| [cancelRFQQuote()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5657) | :closed_lock_with_key: | POST | `/v5/rfq/cancel-quote` | +| [cancelAllRFQQuotes()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5667) | :closed_lock_with_key: | POST | `/v5/rfq/cancel-all-quotes` | +| [getRFQRealtimeInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5681) | :closed_lock_with_key: | GET | `/v5/rfq/rfq-realtime` | +| [getRFQHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5693) | :closed_lock_with_key: | GET | `/v5/rfq/rfq-list` | +| [getRFQRealtimeQuote()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5707) | :closed_lock_with_key: | GET | `/v5/rfq/quote-realtime` | +| [getRFQHistoryQuote()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5722) | :closed_lock_with_key: | GET | `/v5/rfq/quote-list` | +| [getRFQTrades()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5735) | :closed_lock_with_key: | GET | `/v5/rfq/trade-list` | +| [getRFQPublicTrades()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5748) | :closed_lock_with_key: | GET | `/v5/rfq/public-trades` | +| [acceptNonLPQuote()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5764) | :closed_lock_with_key: | POST | `/v5/rfq/accept-other-quote` | +| [getRFQDetails()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5770) | :closed_lock_with_key: | GET | `/v5/rfq/rfq-detail-list` | +| [getP2PAccountCoinsBalance()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5795) | :closed_lock_with_key: | GET | `/v5/asset/transfer/query-account-coins-balance` | +| [getP2POnlineAds()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5812) | :closed_lock_with_key: | POST | `/v5/p2p/item/online` | +| [createP2PAd()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5821) | :closed_lock_with_key: | POST | `/v5/p2p/item/create` | +| [cancelP2PAd()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5830) | :closed_lock_with_key: | POST | `/v5/p2p/item/cancel` | +| [updateP2PAd()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5844) | :closed_lock_with_key: | POST | `/v5/p2p/item/update` | +| [getP2PPersonalAds()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5854) | :closed_lock_with_key: | POST | `/v5/p2p/item/personal/list` | +| [getP2PAdDetail()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5863) | :closed_lock_with_key: | POST | `/v5/p2p/item/info` | +| [getP2POrders()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5878) | :closed_lock_with_key: | POST | `/v5/p2p/order/simplifyList` | +| [getP2POrderDetail()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5888) | :closed_lock_with_key: | POST | `/v5/p2p/order/info` | +| [getP2PPendingOrders()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5897) | :closed_lock_with_key: | POST | `/v5/p2p/order/pending/simplifyList` | +| [markP2POrderAsPaid()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5906) | :closed_lock_with_key: | POST | `/v5/p2p/order/pay` | +| [releaseP2POrder()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5915) | :closed_lock_with_key: | POST | `/v5/p2p/order/finish` | +| [reviewP2PSellerCancelOrderApply()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5927) | :closed_lock_with_key: | POST | `/v5/p2p/order/buyer/examine/sellerCancelOrderApply` | +| [sendP2POrderMessage()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5939) | :closed_lock_with_key: | POST | `/v5/p2p/order/message/send` | +| [getP2PChatSessions()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5954) | :closed_lock_with_key: | POST | `/v5/p2p/chat/session/list_v1` | +| [getP2PChatSessionId()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L5964) | :closed_lock_with_key: | POST | `/v5/p2p/chat/session/getSessionId` | +| [sendP2PChatMessage()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6000) | :closed_lock_with_key: | POST | `/v5/p2p/chat/message/send_v1` | +| [getP2PChatMessages()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6012) | :closed_lock_with_key: | POST | `/v5/p2p/chat/message/listpage_v1` | +| [getP2POrderMessages()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6021) | :closed_lock_with_key: | POST | `/v5/p2p/order/message/listpage` | +| [getP2PUserInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6035) | :closed_lock_with_key: | POST | `/v5/p2p/user/personal/info` | +| [getP2PCounterpartyUserInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6042) | :closed_lock_with_key: | POST | `/v5/p2p/user/order/personal/info` | +| [getP2PUserPayments()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6051) | :closed_lock_with_key: | POST | `/v5/p2p/user/payment/list` | +| [setApiRateLimit()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6071) | :closed_lock_with_key: | POST | `/v5/apilimit/set` | +| [queryApiRateLimit()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6100) | :closed_lock_with_key: | GET | `/v5/apilimit/query` | +| [getRateLimitCap()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6119) | :closed_lock_with_key: | GET | `/v5/apilimit/query-cap` | +| [getAllRateLimits()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6138) | :closed_lock_with_key: | GET | `/v5/apilimit/query-all` | +| [getLaunchpoolProjectList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6161) | | GET | `/v5/spot-x/launchpool/project/list` | +| [getLaunchpoolUserActivityLog()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6167) | :closed_lock_with_key: | POST | `/v5/spot-x/launchpool/user/activity-log` | +| [getLaunchpoolCurrentStaking()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6173) | :closed_lock_with_key: | GET | `/v5/spot-x/launchpool/user/current-staking` | +| [getLaunchpoolUserHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6179) | :closed_lock_with_key: | POST | `/v5/spot-x/launchpool/user/history` | +| [getPuzzleProjectList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6185) | | GET | `/v5/spot-x/puzzle/project/list` | +| [getTokenSplashProjectList()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6191) | | GET | `/v5/spot-x/token-splash/project/list` | +| [getTokenSplashUserActivityParams()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6197) | :closed_lock_with_key: | GET | `/v5/spot-x/token-splash/user/activity-params` | +| [getEventInstrumentsInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6220) | | GET | `/v5/event/instruments-info` | +| [getEventOrderbook()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6231) | | GET | `/v5/event/orderbook` | +| [getEventOrderHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6242) | :closed_lock_with_key: | GET | `/v5/event/order-list` | +| [getEventActiveOrders()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6253) | :closed_lock_with_key: | GET | `/v5/event/order-realtime` | +| [getEventPositionInfo()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6264) | :closed_lock_with_key: | GET | `/v5/event/positions` | +| [getEventTradeHistory()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6275) | :closed_lock_with_key: | GET | `/v5/event/trades` | +| [getEventSettlementRecords()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6286) | :closed_lock_with_key: | GET | `/v5/event/settlements` | +| [submitEventQuote()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6297) | :closed_lock_with_key: | POST | `/v5/event/quotes` | +| [cancelEventQuote()](https://github.com/sieblyio/bybit-api/blob/master/src/rest-client-v5.ts#L6308) | :closed_lock_with_key: | POST | `/v5/event/cancel` | # websocket-api-client.ts diff --git a/llms.txt b/llms.txt index 3f9e9cb2..4cc32437 100644 --- a/llms.txt +++ b/llms.txt @@ -3674,6 +3674,60 @@ export interface GetAlphaAssetDetailParamsV5 { tokenAddress: string; } +================ +File: src/types/request/v5-broker.ts +================ +export interface GetExchangeBrokerEarningsParamsV5 { + bizType?: 'SPOT' | 'DERIVATIVES' | 'OPTIONS' | 'CONVERT' | 'FIAT_CONVERT'; + begin?: string; + end?: string; + uid?: string; + limit?: number; + cursor?: string; +} +⋮---- +export interface GetBrokerSubAccountDepositsV5 { + id?: string; + txID?: string; + subMemberId?: string; + coin?: string; + startTime?: number; + endTime?: number; + limit?: number; + cursor?: string; +} +⋮---- +export interface IssueVoucherParamsV5 { + accountId: string; + awardId: string; + specCode: string; + amount: string; + brokerId: string; +} +⋮---- +export interface GetBrokerIssuedVoucherParamsV5 { + accountId: string; + awardId: string; + specCode: string; + withUsedAmount?: boolean; +} +⋮---- +/** Set Rate Limit - exchange broker only. API rate limit: 1 req per second. */ +export interface SetBrokerRateLimitParamsV5 { + list: { + uids: string; + bizType: string; + rate: number; + }[]; +} +⋮---- +/** Get All Rate Limits - exchange broker only. API rate limit: 1 req per second. */ +export interface GetAllBrokerRateLimitsParamsV5 { + limit?: string; + cursor?: string; + uids?: string; +} + ================ File: src/types/request/v5-card.ts ================ @@ -5623,6 +5677,119 @@ export interface AlphaAssetDetailResultV5 { assetList: AlphaAssetV5[]; } +================ +File: src/types/response/v5-broker.ts +================ +interface EarningDetailV5 { + userId: string; + bizType: 'SPOT' | 'DERIVATIVES' | 'OPTIONS' | 'CONVERT' | 'FIAT_CONVERT'; + symbol: string; + coin: string; + earning: string; + markupEarning: string; + baseFeeEarning: string; + orderId: string; + execTime: string; +} +⋮---- +interface TotalEarningCategoryV5 { + coin: string; + earning: string; +} +⋮---- +export interface ExchangeBrokerEarningResultV5 { + totalEarningCat: { + spot: TotalEarningCategoryV5[]; + derivatives: TotalEarningCategoryV5[]; + options: TotalEarningCategoryV5[]; + convert: TotalEarningCategoryV5[]; + fiatConvert?: TotalEarningCategoryV5[]; + total: TotalEarningCategoryV5[]; + }; + details: EarningDetailV5[]; + nextPageCursor: string; +} +⋮---- +export interface ExchangeBrokerAccountInfoV5 { + subAcctQty: string; + maxSubAcctQty: string; + baseFeeRebateRate: { + spot: string; + derivatives: string; + }; + markupFeeRebateRate: { + spot: string; + derivatives: string; + convert: string; + }; + ts: string; +} +⋮---- +export interface ExchangeBrokerSubAccountDepositRecordV5 { + id: string; + subMemberId: string; + coin: string; + chain: string; + amount: string; + txID: string; + status: number; + toAddress: string; + tag: string; + depositFee: string; + successAt: string; + confirmations: string; + txIndex: string; + blockHash: string; + batchReleaseLimit: string; + depositType: string; +} +⋮---- +export interface BrokerVoucherSpecV5 { + id: string; + coin: string; + amountUnit: 'AWARD_AMOUNT_UNIT_USD' | 'AWARD_AMOUNT_UNIT_COIN'; + productLine: string; + subProductLine: string; + totalAmount: { + [key: string]: string; + }; + usedAmount: string; +} +⋮---- +export interface BrokerIssuedVoucherV5 { + accountId: string; + awardId: string; + specCode: string; + amount: string; + isClaimed: boolean; + startAt: string; + endAt: string; + effectiveAt: string; + ineffectiveAt: string; + usedAmount: string; +} +⋮---- +export interface BrokerRateLimitSetResultItemV5 { + uids: string; + bizType: string; + rate: number; + success: boolean; + msg: string; +} +⋮---- +export interface BrokerRateLimitCapItemV5 { + bizType: string; + totalRate: string; + ebCap: string; + uidCap: string; +} +⋮---- +export interface BrokerRateLimitAllItemV5 { + uids: string; + bizType: string; + rate: number; +} + ================ File: src/types/response/v5-card.ts ================ @@ -8053,60 +8220,6 @@ verbose: true, // report individual test // Whether to use watchman for file crawling // watchman: true, -================ -File: src/types/request/v5-broker.ts -================ -export interface GetExchangeBrokerEarningsParamsV5 { - bizType?: 'SPOT' | 'DERIVATIVES' | 'OPTIONS' | 'CONVERT' | 'FIAT_CONVERT'; - begin?: string; - end?: string; - uid?: string; - limit?: number; - cursor?: string; -} -⋮---- -export interface GetBrokerSubAccountDepositsV5 { - id?: string; - txID?: string; - subMemberId?: string; - coin?: string; - startTime?: number; - endTime?: number; - limit?: number; - cursor?: string; -} -⋮---- -export interface IssueVoucherParamsV5 { - accountId: string; - awardId: string; - specCode: string; - amount: string; - brokerId: string; -} -⋮---- -export interface GetBrokerIssuedVoucherParamsV5 { - accountId: string; - awardId: string; - specCode: string; - withUsedAmount?: boolean; -} -⋮---- -/** Set Rate Limit - exchange broker only. API rate limit: 1 req per second. */ -export interface SetBrokerRateLimitParamsV5 { - list: { - uids: string; - bizType: string; - rate: number; - }[]; -} -⋮---- -/** Get All Rate Limits - exchange broker only. API rate limit: 1 req per second. */ -export interface GetAllBrokerRateLimitsParamsV5 { - limit?: string; - cursor?: string; - uids?: string; -} - ================ File: src/types/request/v5-earn-liquidity-mining.ts ================ @@ -8654,124 +8767,11 @@ export interface BatchCancelOrderParamsV5 { } ================ -File: src/types/response/v5-broker.ts +File: src/types/response/v5-earn-liquidity-mining.ts ================ -interface EarningDetailV5 { - userId: string; - bizType: 'SPOT' | 'DERIVATIVES' | 'OPTIONS' | 'CONVERT' | 'FIAT_CONVERT'; - symbol: string; - coin: string; - earning: string; - markupEarning: string; - baseFeeEarning: string; - orderId: string; - execTime: string; -} -⋮---- -interface TotalEarningCategoryV5 { +export interface LiquidityMiningApyBreakdownV5 { coin: string; - earning: string; -} -⋮---- -export interface ExchangeBrokerEarningResultV5 { - totalEarningCat: { - spot: TotalEarningCategoryV5[]; - derivatives: TotalEarningCategoryV5[]; - options: TotalEarningCategoryV5[]; - convert: TotalEarningCategoryV5[]; - fiatConvert?: TotalEarningCategoryV5[]; - total: TotalEarningCategoryV5[]; - }; - details: EarningDetailV5[]; - nextPageCursor: string; -} -⋮---- -export interface ExchangeBrokerAccountInfoV5 { - subAcctQty: string; - maxSubAcctQty: string; - baseFeeRebateRate: { - spot: string; - derivatives: string; - }; - markupFeeRebateRate: { - spot: string; - derivatives: string; - convert: string; - }; - ts: string; -} -⋮---- -export interface ExchangeBrokerSubAccountDepositRecordV5 { - id: string; - subMemberId: string; - coin: string; - chain: string; - amount: string; - txID: string; - status: number; - toAddress: string; - tag: string; - depositFee: string; - successAt: string; - confirmations: string; - txIndex: string; - blockHash: string; - batchReleaseLimit: string; - depositType: string; -} -⋮---- -export interface BrokerVoucherSpecV5 { - id: string; - coin: string; - amountUnit: 'AWARD_AMOUNT_UNIT_USD' | 'AWARD_AMOUNT_UNIT_COIN'; - productLine: string; - subProductLine: string; - totalAmount: { - [key: string]: string; - }; - usedAmount: string; -} -⋮---- -export interface BrokerIssuedVoucherV5 { - accountId: string; - awardId: string; - specCode: string; - amount: string; - isClaimed: boolean; - startAt: string; - endAt: string; - effectiveAt: string; - ineffectiveAt: string; - usedAmount: string; -} -⋮---- -export interface BrokerRateLimitSetResultItemV5 { - uids: string; - bizType: string; - rate: number; - success: boolean; - msg: string; -} -⋮---- -export interface BrokerRateLimitCapItemV5 { - bizType: string; - totalRate: string; - ebCap: string; - uidCap: string; -} -⋮---- -export interface BrokerRateLimitAllItemV5 { - uids: string; - bizType: string; - rate: number; -} - -================ -File: src/types/response/v5-earn-liquidity-mining.ts -================ -export interface LiquidityMiningApyBreakdownV5 { - coin: string; - apy: string; + apy: string; } ⋮---- export interface LiquidityMiningProductV5 { @@ -9867,244 +9867,532 @@ export interface ManualRepayParamsV5 { */ ================ -File: src/types/request/v5-crypto-loan.ts +File: src/types/request/v5-asset.ts ================ -export interface BorrowCryptoLoanParamsV5 { - loanCurrency: string; - loanAmount?: string; - loanTerm?: string; - collateralCurrency: string; - collateralAmount?: string; -} +import { AccountTypeV5, CategoryV5 } from '../shared-v5'; ⋮---- -export interface GetUnpaidLoanOrdersParamsV5 { - orderId?: string; - loanCurrency?: string; - collateralCurrency?: string; - loanTermType?: string; - loanTerm?: string; - limit?: string; +export interface GetCoinExchangeRecordParamsV5 { + fromCoin?: string; + toCoin?: string; + limit?: number; cursor?: string; } ⋮---- -export interface GetRepaymentHistoryParamsV5 { - orderId?: string; - repayId?: string; - loanCurrency?: string; - limit?: string; +export interface GetDeliveryRecordParamsV5 { + category: CategoryV5; + symbol?: string; + startTime?: number; + endTime?: number; + expDate?: string; + limit?: number; cursor?: string; } ⋮---- -export interface GetCompletedLoanOrderHistoryParamsV5 { - orderId?: string; - loanCurrency?: string; - collateralCurrency?: string; - limit?: string; +export interface GetSettlementRecordParamsV5 { + category: CategoryV5; + symbol?: string; + startTime?: number; + endTime?: number; + limit?: number; cursor?: string; } ⋮---- -export interface GetLoanLTVAdjustmentHistoryParamsV5 { - orderId?: string; - adjustId?: string; - collateralCurrency?: string; - limit?: string; - cursor?: string; +export interface GetAssetInfoParamsV5 { + accountType: AccountTypeV5; + coin?: string; } ⋮---- -// New Crypto Loan Request Types -⋮---- -export interface GetBorrowableCoinsParamsV5 { - vipLevel?: string; - currency?: string; +export interface GetAllCoinsBalanceParamsV5 { + memberId?: string; + accountType: AccountTypeV5; + coin?: string; + withBonus?: number; } ⋮---- -export interface GetCollateralCoinsParamsV5 { - currency?: string; +export interface GetAccountCoinBalanceParamsV5 { + memberId?: string; + toMemberId?: string; + accountType: AccountTypeV5; + coin: string; + toAccountType?: AccountTypeV5; + withBonus?: number; + withTransferSafeAmount?: 0 | 1; + withLtvTransferSafeAmount?: 0 | 1; } ⋮---- -export interface GetMaxCollateralAmountParamsV5 { - currency: string; +export interface GetInternalTransferParamsV5 { + transferId?: string; + coin?: string; + status?: string; + startTime?: number; + endTime?: number; + limit?: number; + cursor?: string; } ⋮---- -export interface AdjustCollateralAmountParamsV5 { - currency: string; +export interface UniversalTransferParamsV5 { + transferId: string; + coin: string; amount: string; - direction: '0' | '1'; + fromMemberId: number; + toMemberId: number; + fromAccountType: AccountTypeV5; + toAccountType: AccountTypeV5; } ⋮---- -export interface GetCollateralAdjustmentHistoryParamsV5 { - adjustId?: string; - collateralCurrency?: string; - limit?: string; +export interface GetUniversalTransferRecordsParamsV5 { + transferId?: string; + coin?: string; + status?: string; + startTime?: number; + endTime?: number; + limit?: number; cursor?: string; + fromMemberId?: string; + toMemberId?: string; } ⋮---- -// Flexible Loan Request Types -⋮---- -export interface BorrowFlexibleParamsV5 { - loanCurrency: string; - loanAmount: string; - collateralList?: { - currency: string; - amount: string; - }[]; -} -⋮---- -export interface RepayFlexibleParamsV5 { - loanCurrency: string; - amount: string; +export interface GetAllowedDepositCoinInfoParamsV5 { + coin?: string; + chain?: string; + limit?: number; + cursor?: string; } ⋮---- -export interface RepayCollateralFlexibleParamsV5 { - loanCurrency: string; - collateralCoin: string; - amount: string; +export interface GetDepositRecordParamsV5 { + id?: string; + txID?: string; + coin?: string; + startTime?: number; + endTime?: number; + limit?: number; + cursor?: string; } ⋮---- -export interface GetOngoingFlexibleLoansParamsV5 { - loanCurrency?: string; +export interface GetSubAccountDepositRecordParamsV5 { + id?: string; + txID?: string; + subMemberId: string; + coin?: string; + startTime?: number; + endTime?: number; + limit?: number; + cursor?: string; } ⋮---- -export interface GetBorrowHistoryFlexibleParamsV5 { - orderId?: string; - loanCurrency?: string; - limit?: string; +export interface GetInternalDepositRecordParamsV5 { + txID?: string; + startTime?: number; + endTime?: number; + coin?: string; cursor?: string; + limit?: number; } ⋮---- -export interface GetRepaymentHistoryFlexibleParamsV5 { - repayId?: string; - loanCurrency?: string; - limit?: string; +export interface GetWithdrawalRecordsParamsV5 { + withdrawID?: string; + txID?: string; + coin?: string; + withdrawType?: number; + startTime?: number; + endTime?: number; + limit?: number; cursor?: string; } ⋮---- -// Fixed Loan Request Types -⋮---- -export interface GetSupplyOrderQuoteFixedParamsV5 { - orderCurrency: string; - term?: string; - orderBy: 'apy' | 'term' | 'quantity'; - sort?: number; +export interface GetWithdrawalAddressListParamsV5 { + coin?: string; + chain?: string; + addressType?: 0 | 1 | 2; limit?: number; + cursor?: string; } ⋮---- -export interface GetBorrowOrderQuoteFixedParamsV5 { - orderCurrency: string; - term?: string; - orderBy: 'apy' | 'term' | 'quantity'; - sort?: number; +export interface SubmitDepositOriginatorInfoParamsV5 { + depositId: number; + subAccountId?: number; + /** Travel Rule questionnaire JSON string. See Questionnaire docs. */ + questionnaire: string; +} +⋮---- +/** Travel Rule questionnaire JSON string. See Questionnaire docs. */ +⋮---- +export interface WithdrawParamsV5 { + coin: string; + /** + * When forceChain is 0 or 1, required. When forceChain is 2 (Bybit UID withdraw), may be null/omitted. + */ + chain?: string; + address: string; + tag?: string; + amount: string; + timestamp: number; + forceChain?: number; + /** + * FUND, UTA, or EARN; or comma combo e.g. FUND,UTA,EARN (funding first, then UTA and Earn for remainder). + * SPOT is legacy if still supported for older integrations. + */ + accountType: string; + feeType?: 0 | 1; + requestId?: string; + /** + * Required for Bybit Turkey (TR) site users when creating a withdrawal. Omitted for other regions unless the API requires it. + */ + transactionPurpose?: string; + /** + * Travel Rule questionnaire JSON string (max 16384 bytes). Takes precedence over `beneficiary` / `transactionPurpose` when both are set. + */ + questionnaire?: string; + beneficiary?: { + vaspEntityId?: string; + beneficiaryName?: string; + beneficiaryLegalType?: string; + beneficiaryWalletType?: string; + beneficiaryUnhostedWalletType?: string; + beneficiaryPoiNumber?: string; + beneficiaryPoiType?: string; + beneficiaryPoiIssuingCountry?: string; + beneficiaryPoiExpiredDate?: string; + }; +} +⋮---- +/** + * When forceChain is 0 or 1, required. When forceChain is 2 (Bybit UID withdraw), may be null/omitted. + */ +⋮---- +/** + * FUND, UTA, or EARN; or comma combo e.g. FUND,UTA,EARN (funding first, then UTA and Earn for remainder). + * SPOT is legacy if still supported for older integrations. + */ +⋮---- +/** + * Required for Bybit Turkey (TR) site users when creating a withdrawal. Omitted for other regions unless the API requires it. + */ +⋮---- +/** + * Travel Rule questionnaire JSON string (max 16384 bytes). Takes precedence over `beneficiary` / `transactionPurpose` when both are set. + */ +⋮---- +export interface ConvertCoinsParamsV5 { + coin?: string; + side?: number; + accountType: + | 'eb_convert_funding' + | 'eb_convert_uta' + | 'eb_convert_spot' + | 'eb_convert_contract' + | 'eb_convert_inverse'; +} +⋮---- +export interface RequestConvertQuoteParamsV5 { + fromCoin: string; + toCoin: string; + fromCoinType?: string; + toCoinType?: string; + requestCoin: string; + requestAmount: string; + accountType: + | 'eb_convert_funding' + | 'eb_convert_uta' + | 'eb_convert_spot' + | 'eb_convert_contract' + | 'eb_convert_inverse'; + requestId?: string; +} +⋮---- +export interface GetConvertHistoryParamsV5 { + accountType?: string; + index?: number; limit?: number; } ⋮---- -export interface CreateBorrowOrderFixedParamsV5 { - orderCurrency: string; - orderAmount: string; - annualRate: string; - term: string; - autoRepay?: string; // Deprecated - repayType?: string; // 1: Auto Repayment (default); 2: Transfer to flexible loan - strategyType?: 'PARTIAL' | 'FULL'; - collateralList?: { - currency: string; - amount: string; - }[]; +export interface GetSmallBalanceListParamsV5 { + accountType: 'eb_convert_uta'; // Wallet type, only supports Unified wallet + fromCoin?: string; // Source currency } ⋮---- -autoRepay?: string; // Deprecated -repayType?: string; // 1: Auto Repayment (default); 2: Transfer to flexible loan +accountType: 'eb_convert_uta'; // Wallet type, only supports Unified wallet +fromCoin?: string; // Source currency ⋮---- -export interface GetFixedLoanAvailableInventoryParamsV5 { - currency: string; - term: string; - annualRate: string; +export interface GetFiatTradingPairListParamsV5 { + side?: 0 | 1; // 0: buy (buy crypto, sell fiat), 1: sell (sell crypto, buy fiat) } ⋮---- -export interface GetFlexibleLoanAvailableInventoryParamsV5 { - currency: string; +side?: 0 | 1; // 0: buy (buy crypto, sell fiat), 1: sell (sell crypto, buy fiat) +⋮---- +/** Funding Account Transaction History. Interval createTimeFrom-createTimeTo max 7 days. */ +export interface GetFundingAccountTransactionHistoryParamsV5 { + createTimeFrom?: string; + createTimeTo?: string; + limit?: string; + cursor?: string; } ⋮---- -export interface CreateSupplyOrderFixedParamsV5 { - orderCurrency: string; - orderAmount: string; - annualRate: string; - term: string; - /** - * Source account for supply. 0: Funding Account; 1: Earn Flexible Account; 2: ALL. Default: 0 - */ - availableSource?: '0' | '1' | '2'; +/** Asset Overview. memberId required when querying sub account via master API key. */ +export interface GetAssetOverviewParamsV5 { + memberId?: string; + /** Fiat currency for valuation; defaults to USD if omitted. */ + valuationCurrency?: string; + /** Account type filter; returns all if omitted. */ + accountType?: string; } ⋮---- -/** - * Source account for supply. 0: Funding Account; 1: Earn Flexible Account; 2: ALL. Default: 0 - */ +/** Fiat currency for valuation; defaults to USD if omitted. */ ⋮---- -export interface CancelBorrowOrderFixedParamsV5 { - orderId: string; +/** Account type filter; returns all if omitted. */ +⋮---- +/** GET /v5/asset/portfolio-margin */ +export interface GetPortfolioMarginInfoParamsV5 { + baseCoin?: string; } ⋮---- -export interface CancelSupplyOrderFixedParamsV5 { - orderId: string; - /** - * Account to receive the refund. 0: Funding Account; 1: EasyEarn. Default: 0 - */ - refundedAccount?: '0' | '1'; +/** GET /v5/asset/total-members-assets */ +export interface GetTotalMembersAssetsParamsV5 { + /** If omitted, defaults to BTC. Total is quoted in this coin. */ + coin?: string; } ⋮---- -/** - * Account to receive the refund. 0: Funding Account; 1: EasyEarn. Default: 0 - */ +/** If omitted, defaults to BTC. Total is quoted in this coin. */ + +================ +File: src/types/request/v5-crypto-loan.ts +================ +export interface BorrowCryptoLoanParamsV5 { + loanCurrency: string; + loanAmount?: string; + loanTerm?: string; + collateralCurrency: string; + collateralAmount?: string; +} ⋮---- -export interface GetBorrowContractInfoFixedParamsV5 { +export interface GetUnpaidLoanOrdersParamsV5 { orderId?: string; - loanId?: string; - orderCurrency?: string; - term?: string; + loanCurrency?: string; + collateralCurrency?: string; + loanTermType?: string; + loanTerm?: string; limit?: string; cursor?: string; } ⋮---- -export interface GetSupplyContractInfoFixedParamsV5 { +export interface GetRepaymentHistoryParamsV5 { orderId?: string; - supplyId?: string; - supplyCurrency?: string; - term?: string; + repayId?: string; + loanCurrency?: string; limit?: string; cursor?: string; } ⋮---- -export interface GetBorrowOrderInfoFixedParamsV5 { +export interface GetCompletedLoanOrderHistoryParamsV5 { orderId?: string; - orderCurrency?: string; - state?: string; - term?: string; + loanCurrency?: string; + collateralCurrency?: string; limit?: string; cursor?: string; } ⋮---- -export interface GetSupplyOrderInfoFixedParamsV5 { +export interface GetLoanLTVAdjustmentHistoryParamsV5 { orderId?: string; - orderCurrency?: string; - state?: string; - term?: string; + adjustId?: string; + collateralCurrency?: string; limit?: string; cursor?: string; } ⋮---- -export interface RepayFixedParamsV5 { - loanId?: string; - loanCurrency?: string; +// New Crypto Loan Request Types +⋮---- +export interface GetBorrowableCoinsParamsV5 { + vipLevel?: string; + currency?: string; } ⋮---- -export interface RepayCollateralFixedParamsV5 { - loanCurrency: string; - collateralCoin: string; +export interface GetCollateralCoinsParamsV5 { + currency?: string; +} +⋮---- +export interface GetMaxCollateralAmountParamsV5 { + currency: string; +} +⋮---- +export interface AdjustCollateralAmountParamsV5 { + currency: string; amount: string; + direction: '0' | '1'; } ⋮---- -export interface GetRepaymentHistoryFixedParamsV5 { - repayId?: string; - loanCurrency?: string; +export interface GetCollateralAdjustmentHistoryParamsV5 { + adjustId?: string; + collateralCurrency?: string; + limit?: string; + cursor?: string; +} +⋮---- +// Flexible Loan Request Types +⋮---- +export interface BorrowFlexibleParamsV5 { + loanCurrency: string; + loanAmount: string; + collateralList?: { + currency: string; + amount: string; + }[]; +} +⋮---- +export interface RepayFlexibleParamsV5 { + loanCurrency: string; + amount: string; +} +⋮---- +export interface RepayCollateralFlexibleParamsV5 { + loanCurrency: string; + collateralCoin: string; + amount: string; +} +⋮---- +export interface GetOngoingFlexibleLoansParamsV5 { + loanCurrency?: string; +} +⋮---- +export interface GetBorrowHistoryFlexibleParamsV5 { + orderId?: string; + loanCurrency?: string; + limit?: string; + cursor?: string; +} +⋮---- +export interface GetRepaymentHistoryFlexibleParamsV5 { + repayId?: string; + loanCurrency?: string; + limit?: string; + cursor?: string; +} +⋮---- +// Fixed Loan Request Types +⋮---- +export interface GetSupplyOrderQuoteFixedParamsV5 { + orderCurrency: string; + term?: string; + orderBy: 'apy' | 'term' | 'quantity'; + sort?: number; + limit?: number; +} +⋮---- +export interface GetBorrowOrderQuoteFixedParamsV5 { + orderCurrency: string; + term?: string; + orderBy: 'apy' | 'term' | 'quantity'; + sort?: number; + limit?: number; +} +⋮---- +export interface CreateBorrowOrderFixedParamsV5 { + orderCurrency: string; + orderAmount: string; + annualRate: string; + term: string; + autoRepay?: string; // Deprecated + repayType?: string; // 1: Auto Repayment (default); 2: Transfer to flexible loan + strategyType?: 'PARTIAL' | 'FULL'; + collateralList?: { + currency: string; + amount: string; + }[]; +} +⋮---- +autoRepay?: string; // Deprecated +repayType?: string; // 1: Auto Repayment (default); 2: Transfer to flexible loan +⋮---- +export interface GetFixedLoanAvailableInventoryParamsV5 { + currency: string; + term: string; + annualRate: string; +} +⋮---- +export interface GetFlexibleLoanAvailableInventoryParamsV5 { + currency: string; +} +⋮---- +export interface CreateSupplyOrderFixedParamsV5 { + orderCurrency: string; + orderAmount: string; + annualRate: string; + term: string; + /** + * Source account for supply. 0: Funding Account; 1: Earn Flexible Account; 2: ALL. Default: 0 + */ + availableSource?: '0' | '1' | '2'; +} +⋮---- +/** + * Source account for supply. 0: Funding Account; 1: Earn Flexible Account; 2: ALL. Default: 0 + */ +⋮---- +export interface CancelBorrowOrderFixedParamsV5 { + orderId: string; +} +⋮---- +export interface CancelSupplyOrderFixedParamsV5 { + orderId: string; + /** + * Account to receive the refund. 0: Funding Account; 1: EasyEarn. Default: 0 + */ + refundedAccount?: '0' | '1'; +} +⋮---- +/** + * Account to receive the refund. 0: Funding Account; 1: EasyEarn. Default: 0 + */ +⋮---- +export interface GetBorrowContractInfoFixedParamsV5 { + orderId?: string; + loanId?: string; + orderCurrency?: string; + term?: string; + limit?: string; + cursor?: string; +} +⋮---- +export interface GetSupplyContractInfoFixedParamsV5 { + orderId?: string; + supplyId?: string; + supplyCurrency?: string; + term?: string; + limit?: string; + cursor?: string; +} +⋮---- +export interface GetBorrowOrderInfoFixedParamsV5 { + orderId?: string; + orderCurrency?: string; + state?: string; + term?: string; + limit?: string; + cursor?: string; +} +⋮---- +export interface GetSupplyOrderInfoFixedParamsV5 { + orderId?: string; + orderCurrency?: string; + state?: string; + term?: string; + limit?: string; + cursor?: string; +} +⋮---- +export interface RepayFixedParamsV5 { + loanId?: string; + loanCurrency?: string; +} +⋮---- +export interface RepayCollateralFixedParamsV5 { + loanCurrency: string; + collateralCoin: string; + amount: string; +} +⋮---- +export interface GetRepaymentHistoryFixedParamsV5 { + repayId?: string; + loanCurrency?: string; limit?: string; cursor?: string; } @@ -10268,6 +10556,86 @@ export interface GetFriendReferralsParamsV5 { cursor?: string; } ⋮---- +/** + * Referral product line. + * + * 0 unknown, 1 spot, 2 contracts, 3 options, 4 USDC perpetual, 6 TradeFi, 9 Alpha. + * Unrecognized response values are returned as 0. + */ +export type ReferralProductLineV5 = 0 | 1 | 2 | 3 | 4 | 6 | 9; +⋮---- +/** + * Invitee status (`friendStatus`). + * + * 0 unknown, 1 signed up, 2 first deposit, 3 first trade, 4 qualified, + * 5 not qualified, 6 historical invitation, 7 boost in progress, + * 8 boost qualified, 9 boost failed, 10 boost user signed up. + */ +export type ReferralFriendStatusV5 = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10; +⋮---- +/** + * POST /v5/referral/commission/records + * + * All fields are optional. Send `{}` when no filter is needed. An empty + * `userIdList` does not filter by invitee. `page` 0 is treated as 1. + * `pageSize` 0 or greater than 200 is treated as 10. + * Times are `YYYY-MM-DD HH:mm:ss`. Property names are the proto camelCase + * names; gateway serialization is not independently verified. + */ +export interface GetReferralCommissionRecordsParamsV5 { + /** Invitee IDs. An empty list does not filter by invitee. */ + userIdList?: number[]; + /** Start time, `YYYY-MM-DD HH:mm:ss`. An unparsable value is sent downstream as `""`. */ + startTime?: string; + /** End time, `YYYY-MM-DD HH:mm:ss`. An unparsable value is sent downstream as `""`. */ + endTime?: string; + /** One-based page. `0` is treated as `1`. */ + page?: number; + /** Page size. `0` or a value greater than 200 is treated as 10. */ + pageSize?: number; + productLine?: ReferralProductLineV5; +} +⋮---- +/** Invitee IDs. An empty list does not filter by invitee. */ +⋮---- +/** Start time, `YYYY-MM-DD HH:mm:ss`. An unparsable value is sent downstream as `""`. */ +⋮---- +/** End time, `YYYY-MM-DD HH:mm:ss`. An unparsable value is sent downstream as `""`. */ +⋮---- +/** One-based page. `0` is treated as `1`. */ +⋮---- +/** Page size. `0` or a value greater than 200 is treated as 10. */ +⋮---- +/** + * POST /v5/referral/user/invitations + * + * All fields are optional. An empty `userIdList` does not filter by invitee. + * Invalid or empty times are passed downstream as `0`. + */ +export interface GetReferralUserInvitationsParamsV5 { + /** Invitee IDs. An empty list does not filter by invitee. */ + userIdList?: number[]; + /** `YYYY-MM-DD HH:mm:ss`. Invalid or empty values are passed downstream as `0`. */ + startTime?: string; + /** `YYYY-MM-DD HH:mm:ss`. Invalid or empty values are passed downstream as `0`. */ + endTime?: string; + /** Page number. `0` is treated as `1`. */ + page?: number; + /** Page size. `0` or a value greater than 200 is treated as 10. */ + pageSize?: number; + friendStatus?: ReferralFriendStatusV5; +} +⋮---- +/** Invitee IDs. An empty list does not filter by invitee. */ +⋮---- +/** `YYYY-MM-DD HH:mm:ss`. Invalid or empty values are passed downstream as `0`. */ +⋮---- +/** `YYYY-MM-DD HH:mm:ss`. Invalid or empty values are passed downstream as `0`. */ +⋮---- +/** Page number. `0` is treated as `1`. */ +⋮---- +/** Page size. `0` or a value greater than 200 is treated as 10. */ +⋮---- /** Sign Agreement. Only master account. * - `category` (legacy): 2 = metals (XAU/XAG perps; stock perps share this); 3 = crude oil. New enum values are not added here; prefer `categoryV2`. * - `categoryV2` (recommended): 1 = metals; 2 = crude oil. Additional values may be added by the API; use a numeric literal or variable. @@ -11409,779 +11777,491 @@ protected resolveEmittableEvents( // In case of catastrophic failure, fallback to noisy emit update ================ -File: src/types/request/v5-asset.ts +File: src/types/request/v5-earn.ts ================ -import { AccountTypeV5, CategoryV5 } from '../shared-v5'; +export interface GetEarnCouponListParamsV5 { + category: 'FlexibleSaving' | 'DualAssets'; +} ⋮---- -export interface GetCoinExchangeRecordParamsV5 { - fromCoin?: string; - toCoin?: string; - limit?: number; - cursor?: string; +/** GET /v5/earn/flexible-saving/auto-savings. coins is a repeated query param, max 50. */ +export interface GetFlexibleSavingAutoSavingsParamsV5 { + coins?: string[]; } ⋮---- -export interface GetDeliveryRecordParamsV5 { - category: CategoryV5; - symbol?: string; - startTime?: number; - endTime?: number; - expDate?: string; - limit?: number; - cursor?: string; +/** POST /v5/earn/flexible-saving/auto-savings. Omit coin to update the global setting. */ +export interface SetFlexibleSavingAutoSavingsParamsV5 { + coin?: string; + isSelected: boolean; + purchaseImmediately?: boolean; } ⋮---- -export interface GetSettlementRecordParamsV5 { - category: CategoryV5; - symbol?: string; +export interface SubmitStakeRedeemParamsV5 { + category: string; + orderType: 'Stake' | 'Redeem'; + accountType: 'FUND' | 'UNIFIED'; + amount: string; + coin: string; + productId: string; + orderLinkId: string; + toAccountType?: 'FUND' | 'UNIFIED'; +} +⋮---- +export interface GetEarnOrderHistoryParamsV5 { + category: string; + orderId?: string; + orderLinkId?: string; + productId?: string; startTime?: number; endTime?: number; limit?: number; cursor?: string; } ⋮---- -export interface GetAssetInfoParamsV5 { - accountType: AccountTypeV5; - coin?: string; -} -⋮---- -export interface GetAllCoinsBalanceParamsV5 { - memberId?: string; - accountType: AccountTypeV5; +export interface GetEarnPositionParamsV5 { + category: string; + productId?: string; coin?: string; - withBonus?: number; -} -⋮---- -export interface GetAccountCoinBalanceParamsV5 { - memberId?: string; - toMemberId?: string; - accountType: AccountTypeV5; - coin: string; - toAccountType?: AccountTypeV5; - withBonus?: number; - withTransferSafeAmount?: 0 | 1; - withLtvTransferSafeAmount?: 0 | 1; } ⋮---- -export interface GetInternalTransferParamsV5 { - transferId?: string; - coin?: string; - status?: string; +export interface GetEarnYieldHistoryParamsV5 { + category: string; + productId?: string; startTime?: number; endTime?: number; limit?: number; cursor?: string; } ⋮---- -export interface UniversalTransferParamsV5 { - transferId: string; - coin: string; - amount: string; - fromMemberId: number; - toMemberId: number; - fromAccountType: AccountTypeV5; - toAccountType: AccountTypeV5; -} -⋮---- -export interface GetUniversalTransferRecordsParamsV5 { - transferId?: string; - coin?: string; - status?: string; +export interface GetEarnHourlyYieldHistoryParamsV5 { + category: string; + productId?: string; startTime?: number; endTime?: number; limit?: number; cursor?: string; - fromMemberId?: string; - toMemberId?: string; } ⋮---- -export interface GetAllowedDepositCoinInfoParamsV5 { - coin?: string; - chain?: string; - limit?: number; - cursor?: string; +export interface ModifyEarnPositionParamsV5 { + category: 'OnChain'; + productId: number; + positionId: number; + autoReinvest: 0 | 1; } ⋮---- -export interface GetDepositRecordParamsV5 { - id?: string; - txID?: string; - coin?: string; +export interface GetEarnAprHistoryParamsV5 { + category: 'FlexibleSaving' | 'OnChain'; + productId: string; startTime?: number; endTime?: number; - limit?: number; - cursor?: string; } ⋮---- -export interface GetSubAccountDepositRecordParamsV5 { - id?: string; - txID?: string; - subMemberId: string; +/** + * GET /v5/earn/advance/product — Advanced Earn: Dual Asset, Double Win, Smart Leverage, etc. + * Public, no auth. Rate limit: 50 req/s per IP. + */ +export interface GetAdvanceEarnProductParamsV5 { + category: 'DualAssets' | 'DoubleWin' | 'SmartLeverage' | 'DiscountBuy'; coin?: string; - startTime?: number; - endTime?: number; - limit?: number; - cursor?: string; + /** + * Product duration, e.g. 8h, 1d, 2d, 3d, 6d, 7d, 12d (depends on product). + */ + duration?: string; } ⋮---- -export interface GetInternalDepositRecordParamsV5 { - txID?: string; - startTime?: number; - endTime?: number; - coin?: string; - cursor?: string; - limit?: number; -} +/** + * Product duration, e.g. 8h, 1d, 2d, 3d, 6d, 7d, 12d (depends on product). + */ ⋮---- -export interface GetWithdrawalRecordsParamsV5 { - withdrawID?: string; - txID?: string; - coin?: string; - withdrawType?: number; - startTime?: number; - endTime?: number; - limit?: number; +/** GET /v5/earn/hold-to-earn/yield-history — Hold to Earn airdrop daily PnL (Earn permission) */ +export interface GetHoldToEarnAirdropYieldHistoryParamsV5 { + /** Unix seconds. Cannot be earlier than now minus 3 months */ + timeStart?: number; + /** Unix seconds. Requires timeStart ≤ timeEnd */ + timeEnd?: number; + /** Page size [1, 49] */ + limit: number; + /** Pagination cursor from previous `nextCursor` */ cursor?: string; } ⋮---- -export interface GetWithdrawalAddressListParamsV5 { - coin?: string; - chain?: string; - addressType?: 0 | 1 | 2; - limit?: number; - cursor?: string; -} +/** Unix seconds. Cannot be earlier than now minus 3 months */ ⋮---- -export interface SubmitDepositOriginatorInfoParamsV5 { - depositId: number; - subAccountId?: number; - /** Travel Rule questionnaire JSON string. See Questionnaire docs. */ - questionnaire: string; -} +/** Unix seconds. Requires timeStart ≤ timeEnd */ ⋮---- -/** Travel Rule questionnaire JSON string. See Questionnaire docs. */ +/** Page size [1, 49] */ ⋮---- -export interface WithdrawParamsV5 { +/** Pagination cursor from previous `nextCursor` */ + +================ +File: src/types/response/v5-account.ts +================ +import { + AccountMarginModeV5, + AccountTypeV5, + CategoryV5, + TransactionTypeV5, + UnifiedUpdateStatusV5, +} from '../shared-v5'; +⋮---- +export interface WalletBalanceV5Coin { coin: string; - /** - * When forceChain is 0 or 1, required. When forceChain is 2 (Bybit UID withdraw), may be null/omitted. - */ - chain?: string; - address: string; - tag?: string; - amount: string; - timestamp: number; - forceChain?: number; - /** - * FUND, UTA, or EARN; or comma combo e.g. FUND,UTA,EARN (funding first, then UTA and Earn for remainder). - * SPOT is legacy if still supported for older integrations. - */ - accountType: string; - feeType?: 0 | 1; - requestId?: string; - /** - * Required for Bybit Turkey (TR) site users when creating a withdrawal. Omitted for other regions unless the API requires it. - */ - transactionPurpose?: string; - /** - * Travel Rule questionnaire JSON string (max 16384 bytes). Takes precedence over `beneficiary` / `transactionPurpose` when both are set. - */ - questionnaire?: string; - beneficiary?: { - vaspEntityId?: string; - beneficiaryName?: string; - beneficiaryLegalType?: string; - beneficiaryWalletType?: string; - beneficiaryUnhostedWalletType?: string; - beneficiaryPoiNumber?: string; - beneficiaryPoiType?: string; - beneficiaryPoiIssuingCountry?: string; - beneficiaryPoiExpiredDate?: string; - }; + equity: string; + usdValue: string; + walletBalance: string; + free: string; // spot only + locked: string; // spot only + borrowAmount: string; + availableToBorrow: string; // deprecated field + availableToWithdraw: string; + accruedInterest: string; + totalOrderIM: string; + totalPositionIM: string; + totalPositionMM: string; + unrealisedPnl: string; + cumRealisedPnl: string; + bonus: string; + marginCollateral: boolean; + collateralSwitch: boolean; + spotBorrow: string; + colRes?: string; } ⋮---- -/** - * When forceChain is 0 or 1, required. When forceChain is 2 (Bybit UID withdraw), may be null/omitted. - */ +free: string; // spot only +locked: string; // spot only ⋮---- -/** - * FUND, UTA, or EARN; or comma combo e.g. FUND,UTA,EARN (funding first, then UTA and Earn for remainder). - * SPOT is legacy if still supported for older integrations. - */ +availableToBorrow: string; // deprecated field ⋮---- -/** - * Required for Bybit Turkey (TR) site users when creating a withdrawal. Omitted for other regions unless the API requires it. - */ +export interface WalletBalanceV5 { + accountType: AccountTypeV5; + accountLTV: string; + accountIMRate: string; + accountMMRate: string; + accountIMRateByMp: string; + accountMMRateByMp: string; + totalInitialMarginByMp: string; + totalMaintenanceMarginByMp: string; + totalEquity: string; + totalWalletBalance: string; + totalMarginBalance: string; + totalAvailableBalance: string; + totalPerpUPL: string; + totalInitialMargin: string; + totalMaintenanceMargin: string; + coin: WalletBalanceV5Coin[]; +} ⋮---- -/** - * Travel Rule questionnaire JSON string (max 16384 bytes). Takes precedence over `beneficiary` / `transactionPurpose` when both are set. - */ +export interface UnifiedAccountUpgradeResultV5 { + unifiedUpdateStatus: UnifiedUpdateStatusV5; + unifiedUpdateMsg: { + msg: string[] | null; + }; +} ⋮---- -export interface ConvertCoinsParamsV5 { - coin?: string; - side?: number; - accountType: - | 'eb_convert_funding' - | 'eb_convert_uta' - | 'eb_convert_spot' - | 'eb_convert_contract' - | 'eb_convert_inverse'; +export interface BorrowHistoryRecordV5 { + currency: string; + createdTime: number; + borrowCost: string; + hourlyBorrowRate: string; + InterestBearingBorrowSize: string; + costExemption: string; + borrowAmount: string; + unrealisedLoss: string; + freeBorrowedAmount: string; } ⋮---- -export interface RequestConvertQuoteParamsV5 { - fromCoin: string; - toCoin: string; - fromCoinType?: string; - toCoinType?: string; - requestCoin: string; - requestAmount: string; - accountType: - | 'eb_convert_funding' - | 'eb_convert_uta' - | 'eb_convert_spot' - | 'eb_convert_contract' - | 'eb_convert_inverse'; - requestId?: string; +export interface CollateralInfoV5 { + currency: string; + hourlyBorrowRate: string; + maxBorrowingAmount: string; + freeBorrowAmount: string; + freeBorrowingLimit: string; + borrowAmount: string; + availableToBorrow: string; + borrowable: boolean; + borrowUsageRate: string; + marginCollateral: boolean; + collateralSwitch: boolean; + collateralRatio: string; } ⋮---- -export interface GetConvertHistoryParamsV5 { - accountType?: string; - index?: number; - limit?: number; +export interface CoinGreeksV5 { + baseCoin: string; + totalDelta: string; + totalGamma: string; + totalVega: string; + totalTheta: string; } ⋮---- -export interface GetSmallBalanceListParamsV5 { - accountType: 'eb_convert_uta'; // Wallet type, only supports Unified wallet - fromCoin?: string; // Source currency +export interface FeeRateV5 { + symbol: string; + baseCoin: string; + takerFeeRate: string; + makerFeeRate: string; + rpiMakerFeeRate?: string; } ⋮---- -accountType: 'eb_convert_uta'; // Wallet type, only supports Unified wallet -fromCoin?: string; // Source currency -⋮---- -export interface GetFiatTradingPairListParamsV5 { - side?: 0 | 1; // 0: buy (buy crypto, sell fiat), 1: sell (sell crypto, buy fiat) +export interface AccountInfoV5 { + unifiedMarginStatus: number; + marginMode: AccountMarginModeV5; + isMasterTrader: boolean; + spotHedgingStatus: string; + updatedTime: string; } ⋮---- -side?: 0 | 1; // 0: buy (buy crypto, sell fiat), 1: sell (sell crypto, buy fiat) -⋮---- -/** Funding Account Transaction History. Interval createTimeFrom-createTimeTo max 7 days. */ -export interface GetFundingAccountTransactionHistoryParamsV5 { - createTimeFrom?: string; - createTimeTo?: string; - limit?: string; - cursor?: string; +/** + * Get Trade Behaviour Config / `getLimitPriceAction()` — `/v5/account/user-setting-config` + */ +export interface UserSettingConfigV5 { + lpaSpot: boolean; + lpaPerp: boolean; + /** Spot MNT fee deduction enabled. */ + smsef?: boolean; + /** Futures MNT fee deduction enabled. */ + fmsef?: boolean; + /** Delta Neutral mode; may be absent on older API responses. */ + deltaEnable?: boolean; + smpType?: '0' | '1' | '2' | '3' | string; } ⋮---- -/** Asset Overview. memberId required when querying sub account via master API key. */ -export interface GetAssetOverviewParamsV5 { - memberId?: string; - /** Fiat currency for valuation; defaults to USD if omitted. */ - valuationCurrency?: string; - /** Account type filter; returns all if omitted. */ - accountType?: string; -} +/** Spot MNT fee deduction enabled. */ ⋮---- -/** Fiat currency for valuation; defaults to USD if omitted. */ +/** Futures MNT fee deduction enabled. */ ⋮---- -/** Account type filter; returns all if omitted. */ +/** Delta Neutral mode; may be absent on older API responses. */ ⋮---- -/** GET /v5/asset/portfolio-margin */ -export interface GetPortfolioMarginInfoParamsV5 { - baseCoin?: string; +export interface TransactionLogV5 { + symbol: string; + category: CategoryV5; + side: string; + transactionTime: string; + type: TransactionTypeV5; + qty: string; + size: string; + currency: string; + tradePrice: string; + funding: string; + fee: string; + cashFlow: string; + change: string; + cashBalance: string; + feeRate: string; + bonusChange: string; + tradeId: string; + orderId: string; + orderLinkId: string; + extraFees: string; + transSubType: string; + displayType?: string; } ⋮---- -/** GET /v5/asset/total-members-assets */ -export interface GetTotalMembersAssetsParamsV5 { - /** If omitted, defaults to BTC. Total is quoted in this coin. */ - coin?: string; +export interface MMPStateV5 { + baseCoin: string; + mmpEnabled: boolean; + window: string; + frozenPeriod: string; + qtyLimit: string; + deltaLimit: string; + vegaLimit?: string; + mmpFrozenUntil: string; + mmpFrozen: boolean; } ⋮---- -/** If omitted, defaults to BTC. Total is quoted in this coin. */ - -================ -File: src/types/request/v5-earn.ts -================ -export interface GetEarnCouponListParamsV5 { - category: 'FlexibleSaving' | 'DualAssets'; +export interface RepayLiabilityResultV5 { + coin: string; + repaymentQty: string; } ⋮---- -/** GET /v5/earn/flexible-saving/auto-savings. coins is a repeated query param, max 50. */ -export interface GetFlexibleSavingAutoSavingsParamsV5 { - coins?: string[]; +export interface DCPInfoV5 { + product: 'SPOT' | 'DERIVATIVES' | 'OPTIONS'; + dcpStatus: 'ON'; + timeWindow: string; } ⋮---- -/** POST /v5/earn/flexible-saving/auto-savings. Omit coin to update the global setting. */ -export interface SetFlexibleSavingAutoSavingsParamsV5 { - coin?: string; - isSelected: boolean; - purchaseImmediately?: boolean; +export interface ManualRepayResultV5 { + resultStatus: 'P' | 'SU' | 'FA'; } ⋮---- -export interface SubmitStakeRedeemParamsV5 { - category: string; - orderType: 'Stake' | 'Redeem'; - accountType: 'FUND' | 'UNIFIED'; - amount: string; +/** GET /v5/account/option-asset-info — response `result` wraps a nested `result` array. */ +export interface OptionAssetInfoRowV5 { coin: string; - productId: string; - orderLinkId: string; - toAccountType?: 'FUND' | 'UNIFIED'; + totalDelta: string; + totalRPL: string; + totalUPL: string; + assetIM: string; + assetMM: string; + sendTime: number; } ⋮---- -export interface GetEarnOrderHistoryParamsV5 { - category: string; - orderId?: string; - orderLinkId?: string; - productId?: string; - startTime?: number; - endTime?: number; - limit?: number; - cursor?: string; +export interface OptionAssetInfoNestedResultV5 { + result: OptionAssetInfoRowV5[]; } ⋮---- -export interface GetEarnPositionParamsV5 { - category: string; - productId?: string; - coin?: string; +/** GET /v5/account/pay-info */ +export interface PayInfoCollateralItemV5 { + coin: string; + availableSize: string; + availableValue: string; + coinScale: number; + borrowSize: string; + spotHedgeAmount: string; + assetFrozen: string; } ⋮---- -export interface GetEarnYieldHistoryParamsV5 { - category: string; - productId?: string; - startTime?: number; - endTime?: number; - limit?: number; - cursor?: string; +export interface PayInfoBorrowBlockV5 { + coin?: string; + borrowSize: string; + borrowValue?: string; + assetFrozen: string; + availableBalance: string; } ⋮---- -export interface GetEarnHourlyYieldHistoryParamsV5 { - category: string; - productId?: string; - startTime?: number; - endTime?: number; - limit?: number; - cursor?: string; +export interface PayInfoResultV5 { + collateralInfo: { + collateralList: PayInfoCollateralItemV5[]; + }; + borrowInfo: PayInfoBorrowBlockV5; } ⋮---- -export interface ModifyEarnPositionParamsV5 { - category: 'OnChain'; - productId: number; - positionId: number; - autoReinvest: 0 | 1; +/** GET /v5/account/trade-info-for-analysis */ +export interface TradeInfoAnalysisDailyV5 { + day: string; + sumBuyExecValue: string; + sumSellExecValue: string; + sumExecValue: string; } ⋮---- -export interface GetEarnAprHistoryParamsV5 { - category: 'FlexibleSaving' | 'OnChain'; - productId: string; - startTime?: number; - endTime?: number; +export interface TradeInfoForAnalysisResultV5 { + symbolRnl: string; + netExecQty: string; + sumExecValue: string; + sumExecQty: string; + avgBuyExecPrice: string; + sumBuyExecValue: string; + sumBuyExecQty: string; + sumBuyExecFee: string; + sumBuyOrderQty: string; + avgSellExecPrice: string; + sumSellExecValue: string; + sumSellExecQty: string; + sumSellExecFee: string; + sumSellOrderQty: string; + maxMarginVersion: number; + baseCoin: string; + settleCoin: string; + sumPriceList?: TradeInfoAnalysisDailyV5[]; } -⋮---- -/** - * GET /v5/earn/advance/product — Advanced Earn: Dual Asset, Double Win, Smart Leverage, etc. - * Public, no auth. Rate limit: 50 req/s per IP. - */ -export interface GetAdvanceEarnProductParamsV5 { - category: 'DualAssets' | 'DoubleWin' | 'SmartLeverage' | 'DiscountBuy'; - coin?: string; - /** - * Product duration, e.g. 8h, 1d, 2d, 3d, 6d, 7d, 12d (depends on product). - */ - duration?: string; -} -⋮---- -/** - * Product duration, e.g. 8h, 1d, 2d, 3d, 6d, 7d, 12d (depends on product). - */ -⋮---- -/** GET /v5/earn/hold-to-earn/yield-history — Hold to Earn airdrop daily PnL (Earn permission) */ -export interface GetHoldToEarnAirdropYieldHistoryParamsV5 { - /** Unix seconds. Cannot be earlier than now minus 3 months */ - timeStart?: number; - /** Unix seconds. Requires timeStart ≤ timeEnd */ - timeEnd?: number; - /** Page size [1, 49] */ - limit: number; - /** Pagination cursor from previous `nextCursor` */ - cursor?: string; -} -⋮---- -/** Unix seconds. Cannot be earlier than now minus 3 months */ -⋮---- -/** Unix seconds. Requires timeStart ≤ timeEnd */ -⋮---- -/** Page size [1, 49] */ -⋮---- -/** Pagination cursor from previous `nextCursor` */ ================ -File: src/types/response/v5-account.ts +File: src/types/response/v5-position.ts ================ import { - AccountMarginModeV5, - AccountTypeV5, CategoryV5, - TransactionTypeV5, - UnifiedUpdateStatusV5, + ExecTypeV5, + OrderSideV5, + OrderTypeV5, + PositionIdx, + PositionSideV5, + PositionStatusV5, + StopOrderTypeV5, + TPSLModeV5, + TradeModeV5, } from '../shared-v5'; ⋮---- -export interface WalletBalanceV5Coin { - coin: string; - equity: string; - usdValue: string; - walletBalance: string; - free: string; // spot only - locked: string; // spot only - borrowAmount: string; - availableToBorrow: string; // deprecated field - availableToWithdraw: string; - accruedInterest: string; - totalOrderIM: string; - totalPositionIM: string; - totalPositionMM: string; - unrealisedPnl: string; - cumRealisedPnl: string; - bonus: string; - marginCollateral: boolean; - collateralSwitch: boolean; - spotBorrow: string; - colRes?: string; +export interface FuturesLeverageItemV5 { + symbol: string; + leverage: string; + side: OrderSideV5 | ''; + positionIdx: PositionIdx; } ⋮---- -free: string; // spot only -locked: string; // spot only -⋮---- -availableToBorrow: string; // deprecated field -⋮---- -export interface WalletBalanceV5 { - accountType: AccountTypeV5; - accountLTV: string; - accountIMRate: string; - accountMMRate: string; - accountIMRateByMp: string; - accountMMRateByMp: string; - totalInitialMarginByMp: string; - totalMaintenanceMarginByMp: string; - totalEquity: string; - totalWalletBalance: string; - totalMarginBalance: string; - totalAvailableBalance: string; - totalPerpUPL: string; - totalInitialMargin: string; - totalMaintenanceMargin: string; - coin: WalletBalanceV5Coin[]; +export interface FuturesLeverageResultV5 { + category: 'linear' | 'inverse'; + list: FuturesLeverageItemV5[]; } ⋮---- -export interface UnifiedAccountUpgradeResultV5 { - unifiedUpdateStatus: UnifiedUpdateStatusV5; - unifiedUpdateMsg: { - msg: string[] | null; - }; +export interface PositionV5 { + positionIdx: PositionIdx; + riskId: number; + riskLimitValue: string; + symbol: string; + side: PositionSideV5; + size: string; + avgPrice: string; + positionValue: string; + tradeMode: TradeModeV5; + autoAddMargin?: number; + positionStatus: PositionStatusV5; + leverage?: string; + breakEvenPrice?: string; // Break even price, only for linear & inverse + markPrice: string; + liqPrice: string | ''; + bustPrice?: string; + positionIM?: string; + positionMM?: string; + positionBalance?: string; + tpslMode?: TPSLModeV5; + takeProfit?: string; + stopLoss?: string; + trailingStop?: string; + sessionAvgPrice: string | ''; + delta?: string; + gamma?: string; + vega?: string; + theta?: string; + unrealisedPnl: string; + curRealisedPnl: string; + cumRealisedPnl: string; + adlRankIndicator: number; + isReduceOnly: boolean; + mmrSysUpdatedTime: string | ''; + leverageSysUpdatedTime: string | ''; + createdTime: string; + updatedTime: string; + /** Position open timestamp (ms). Default `0` when not set. */ + openTime: number; + positionIMByMp: string; + positionMMByMp: string; + seq: number; + netDeltaRatio?: string; } ⋮---- -export interface BorrowHistoryRecordV5 { - currency: string; - createdTime: number; - borrowCost: string; - hourlyBorrowRate: string; - InterestBearingBorrowSize: string; - costExemption: string; - borrowAmount: string; - unrealisedLoss: string; - freeBorrowedAmount: string; -} +breakEvenPrice?: string; // Break even price, only for linear & inverse ⋮---- -export interface CollateralInfoV5 { - currency: string; - hourlyBorrowRate: string; - maxBorrowingAmount: string; - freeBorrowAmount: string; - freeBorrowingLimit: string; - borrowAmount: string; - availableToBorrow: string; - borrowable: boolean; - borrowUsageRate: string; - marginCollateral: boolean; - collateralSwitch: boolean; - collateralRatio: string; -} +/** Position open timestamp (ms). Default `0` when not set. */ ⋮---- -export interface CoinGreeksV5 { - baseCoin: string; - totalDelta: string; - totalGamma: string; - totalVega: string; - totalTheta: string; +export interface SetRiskLimitResultV5 { + category: CategoryV5; + riskId: number; + riskLimitValue: string; } ⋮---- -export interface FeeRateV5 { +export interface AddOrReduceMarginResultV5 { + category: CategoryV5; symbol: string; - baseCoin: string; - takerFeeRate: string; - makerFeeRate: string; - rpiMakerFeeRate?: string; -} -⋮---- -export interface AccountInfoV5 { - unifiedMarginStatus: number; - marginMode: AccountMarginModeV5; - isMasterTrader: boolean; - spotHedgingStatus: string; + positionIdx: PositionIdx; + riskId: number; + riskLimitValue: string; + size: string; + avgPrice: string; + liqPrice: string; + bustPrice: string; + markPrice: string; + positionValue: string; + leverage: string; + autoAddMargin: 0 | 1; + positionStatus: PositionStatusV5; + positionIM: string; + positionMM: string; + takeProfit: string; + stopLoss: string; + trailingStop: string; + unrealisedPnl: string; + cumRealisedPnl: string; + createdTime: string; updatedTime: string; } ⋮---- -/** - * Get Trade Behaviour Config / `getLimitPriceAction()` — `/v5/account/user-setting-config` - */ -export interface UserSettingConfigV5 { - lpaSpot: boolean; - lpaPerp: boolean; - /** Spot MNT fee deduction enabled. */ - smsef?: boolean; - /** Futures MNT fee deduction enabled. */ - fmsef?: boolean; - /** Delta Neutral mode; may be absent on older API responses. */ - deltaEnable?: boolean; - smpType?: '0' | '1' | '2' | '3' | string; -} -⋮---- -/** Spot MNT fee deduction enabled. */ -⋮---- -/** Futures MNT fee deduction enabled. */ -⋮---- -/** Delta Neutral mode; may be absent on older API responses. */ -⋮---- -export interface TransactionLogV5 { - symbol: string; - category: CategoryV5; - side: string; - transactionTime: string; - type: TransactionTypeV5; - qty: string; - size: string; - currency: string; - tradePrice: string; - funding: string; - fee: string; - cashFlow: string; - change: string; - cashBalance: string; - feeRate: string; - bonusChange: string; - tradeId: string; - orderId: string; - orderLinkId: string; - extraFees: string; - transSubType: string; - displayType?: string; -} -⋮---- -export interface MMPStateV5 { - baseCoin: string; - mmpEnabled: boolean; - window: string; - frozenPeriod: string; - qtyLimit: string; - deltaLimit: string; - vegaLimit?: string; - mmpFrozenUntil: string; - mmpFrozen: boolean; -} -⋮---- -export interface RepayLiabilityResultV5 { - coin: string; - repaymentQty: string; -} -⋮---- -export interface DCPInfoV5 { - product: 'SPOT' | 'DERIVATIVES' | 'OPTIONS'; - dcpStatus: 'ON'; - timeWindow: string; -} -⋮---- -export interface ManualRepayResultV5 { - resultStatus: 'P' | 'SU' | 'FA'; -} -⋮---- -/** GET /v5/account/option-asset-info — response `result` wraps a nested `result` array. */ -export interface OptionAssetInfoRowV5 { - coin: string; - totalDelta: string; - totalRPL: string; - totalUPL: string; - assetIM: string; - assetMM: string; - sendTime: number; -} -⋮---- -export interface OptionAssetInfoNestedResultV5 { - result: OptionAssetInfoRowV5[]; -} -⋮---- -/** GET /v5/account/pay-info */ -export interface PayInfoCollateralItemV5 { - coin: string; - availableSize: string; - availableValue: string; - coinScale: number; - borrowSize: string; - spotHedgeAmount: string; - assetFrozen: string; -} -⋮---- -export interface PayInfoBorrowBlockV5 { - coin?: string; - borrowSize: string; - borrowValue?: string; - assetFrozen: string; - availableBalance: string; -} -⋮---- -export interface PayInfoResultV5 { - collateralInfo: { - collateralList: PayInfoCollateralItemV5[]; - }; - borrowInfo: PayInfoBorrowBlockV5; -} -⋮---- -/** GET /v5/account/trade-info-for-analysis */ -export interface TradeInfoAnalysisDailyV5 { - day: string; - sumBuyExecValue: string; - sumSellExecValue: string; - sumExecValue: string; -} -⋮---- -export interface TradeInfoForAnalysisResultV5 { - symbolRnl: string; - netExecQty: string; - sumExecValue: string; - sumExecQty: string; - avgBuyExecPrice: string; - sumBuyExecValue: string; - sumBuyExecQty: string; - sumBuyExecFee: string; - sumBuyOrderQty: string; - avgSellExecPrice: string; - sumSellExecValue: string; - sumSellExecQty: string; - sumSellExecFee: string; - sumSellOrderQty: string; - maxMarginVersion: number; - baseCoin: string; - settleCoin: string; - sumPriceList?: TradeInfoAnalysisDailyV5[]; -} - -================ -File: src/types/response/v5-position.ts -================ -import { - CategoryV5, - ExecTypeV5, - OrderSideV5, - OrderTypeV5, - PositionIdx, - PositionSideV5, - PositionStatusV5, - StopOrderTypeV5, - TPSLModeV5, - TradeModeV5, -} from '../shared-v5'; -⋮---- -export interface FuturesLeverageItemV5 { - symbol: string; - leverage: string; - side: OrderSideV5 | ''; - positionIdx: PositionIdx; -} -⋮---- -export interface FuturesLeverageResultV5 { - category: 'linear' | 'inverse'; - list: FuturesLeverageItemV5[]; -} -⋮---- -export interface PositionV5 { - positionIdx: PositionIdx; - riskId: number; - riskLimitValue: string; - symbol: string; - side: PositionSideV5; - size: string; - avgPrice: string; - positionValue: string; - tradeMode: TradeModeV5; - autoAddMargin?: number; - positionStatus: PositionStatusV5; - leverage?: string; - breakEvenPrice?: string; // Break even price, only for linear & inverse - markPrice: string; - liqPrice: string | ''; - bustPrice?: string; - positionIM?: string; - positionMM?: string; - positionBalance?: string; - tpslMode?: TPSLModeV5; - takeProfit?: string; - stopLoss?: string; - trailingStop?: string; - sessionAvgPrice: string | ''; - delta?: string; - gamma?: string; - vega?: string; - theta?: string; - unrealisedPnl: string; - curRealisedPnl: string; - cumRealisedPnl: string; - adlRankIndicator: number; - isReduceOnly: boolean; - mmrSysUpdatedTime: string | ''; - leverageSysUpdatedTime: string | ''; - createdTime: string; - updatedTime: string; - /** Position open timestamp (ms). Default `0` when not set. */ - openTime: number; - positionIMByMp: string; - positionMMByMp: string; - seq: number; - netDeltaRatio?: string; -} -⋮---- -breakEvenPrice?: string; // Break even price, only for linear & inverse -⋮---- -/** Position open timestamp (ms). Default `0` when not set. */ -⋮---- -export interface SetRiskLimitResultV5 { - category: CategoryV5; - riskId: number; - riskLimitValue: string; -} -⋮---- -export interface AddOrReduceMarginResultV5 { - category: CategoryV5; - symbol: string; - positionIdx: PositionIdx; - riskId: number; - riskLimitValue: string; - size: string; - avgPrice: string; - liqPrice: string; - bustPrice: string; - markPrice: string; - positionValue: string; - leverage: string; - autoAddMargin: 0 | 1; - positionStatus: PositionStatusV5; - positionIM: string; - positionMM: string; - takeProfit: string; - stopLoss: string; - trailingStop: string; - unrealisedPnl: string; - cumRealisedPnl: string; - createdTime: string; - updatedTime: string; -} -⋮---- -export interface ExecutionV5 { +export interface ExecutionV5 { symbol: string; orderId: string; orderLinkId: string; @@ -12681,2139 +12761,2532 @@ import { RestClientV5 } from '../../src/index'; // siteId: 'ARG_BTL', ================ -File: src/types/response/v5-earn.ts +File: src/types/response/v5-asset.ts ================ -export interface EarnInterestCardV5 { - awardId: number; - specCode: string; - coin: string; - apy: string; - duration: number; - claimedAt: number; - expireAt: number; - usedAt: number; - status: 'InUse' | 'NotUse' | 'Expired' | 'AlreadyUsed' | string; - currentPnl: string; - limitPnl: string; - positionEffectiveAmount: string; - productId: number; - category: 'FlexibleSaving' | 'DualAssets' | string; +import { AccountTypeV5, OrderSideV5, WithdrawalTypeV5 } from '../shared-v5'; +⋮---- +export interface CoinExchangeRecordV5 { + fromCoin: string; + fromAmount: string; + toCoin: string; + toAmount: string; + exchangeRate: string; + createdTime: string; + exchangeTxId: string; } ⋮---- -export interface EarnAwardCardV5 { - awardId: number; - specCode: string; - claimedAt: number; - usedAt: number; - expireAt: number; - status: 'InUse' | 'NotUse' | 'Expired' | 'AlreadyUsed' | string; - amount: string; - limitPnlPercentage: string; - baseCoin: string; - quoteCoin: string; - direction: 1 | 2; - category: 'FlexibleSaving' | 'DualAssets' | string; +export interface DeliveryRecordV5 { + deliveryTime: number; + symbol: string; + side: OrderSideV5; + position: string; + deliveryPrice: string; + strike: string; + fee: string; + deliveryRpl: string; + entryPrice: string; } ⋮---- -export interface EarnCouponListResultV5 { - interestCards: EarnInterestCardV5[]; - awardCards: EarnAwardCardV5[]; +export interface SettlementRecordV5 { + symbol: string; + side: string; + size: number; + sessionAvgPrice: string; + markPrice: string; + realisedPnl: string; + createdTime: string; } ⋮---- -export interface FlexibleSavingAutoSavingsCoinV5 { +export interface AssetInfoAssetV5 { coin: string; - isSelected: boolean; - maxStakingAmount: string; - apr: string; + frozen: string; + free: string; + withdraw: string; } ⋮---- -export interface FlexibleSavingAutoSavingsV5 { - selectedAll: boolean; - coins: FlexibleSavingAutoSavingsCoinV5[]; +export interface AssetInfoV5 { + status: 'ACCOUNT_STATUS_NORMAL' | 'ACCOUNT_STATUS_UNSPECIFIED'; + assets: AssetInfoAssetV5[]; } ⋮---- -export interface EarnProductV5 { - category: string; - estimateApr: string; +export interface CoinBalanceV5 { coin: string; - minStakeAmount: string; - maxStakeAmount: string; - precision: string; - productId: string; - status: 'Available' | 'NotAvailable'; + walletBalance: string; + transferBalance: string; + bonus?: string; } ⋮---- -export interface EarnOrderHistoryV5 { - coin: string; - orderValue: string; - orderType: 'Redeem' | 'Stake'; - orderId: string; - orderLinkId: string; - status: 'Success' | 'Fail' | 'Pending'; - createdAt: string; - productId: string; - updatedAt: string; - swapOrderValue: string; - estimateRedeemTime: string; - estimateStakeTime: string; +export interface AllCoinsBalanceV5 { + accountType: AccountTypeV5; + memberId?: string; + balance: CoinBalanceV5[]; } ⋮---- -export interface EarnPositionFreezeDetailV5 { - amount: string; - description: string; +export interface AccountCoinBalanceV5 { + accountType: AccountTypeV5; + bizType: number; + accountId: string; + memberId: string; + balance: { + coin: string; + walletBalance: string; + transferBalance: string; + bonus: string; + transferSafeAmount: string; + ltvTransferSafeAmount: string; + }; } ⋮---- -export interface EarnPositionV5 { +export interface InternalTransferRecordV5 { + transferId: string; coin: string; - productId: string; amount: string; - totalPnl: string; - claimableYield: string; - id?: string; - status?: string; - orderId?: string; - estimateRedeemTime?: string; - estimateStakeTime?: string; - estimateInterestCalculationTime?: string; - settlementTime?: string; - autoReinvest?: string; - /** Redeemable amount */ - availableAmount: string; - freezeDetails: EarnPositionFreezeDetailV5[]; + fromAccountType: AccountTypeV5; + toAccountType: AccountTypeV5; + timestamp: string; + status: string; } ⋮---- -/** Redeemable amount */ -⋮---- -export interface EarnYieldHistoryV5 { - productId: string; +export interface UniversalTransferRecordV5 { + transferId: string; coin: string; - id: string; amount: string; - yieldType: string; - distributionMode: string; - effectiveStakingAmount: string; - orderId: string; - status: 'Pending' | 'Success' | 'Fail'; - createdAt: string; + fromMemberId: string; + toMemberId: string; + fromAccountType: AccountTypeV5; + toAccountType: AccountTypeV5; + timestamp: string; + status: string; + withdrawReqId?: string; + depositReqId?: string; } ⋮---- -export interface EarnHourlyYieldHistoryV5 { - productId: string; +export interface AllowedDepositCoinInfoV5 { coin: string; - id: string; - amount: string; - effectiveStakingAmount: string; - status: 'Pending' | 'Success' | 'Fail'; - hourlyDate: string; - createdAt: string; + chain: string; + coinShowName: string; + chainType: string; + blockConfirmNumber: number; + minDepositAmount: string; } ⋮---- -export interface EarnAprHistoryPointV5 { - timestamp: string; - apr: string; +export interface DepositRecordV5 { + id: string; + coin: string; + chain: string; + amount: string; + txID: string; + status: number; + toAddress: string; + tag: string; + depositFee: string; + successAt: string; + confirmations: string; + txIndex: string; + blockHash: string; + batchReleaseLimit: string; + depositType: string; + fromAddress: string; + travelRuleStatus?: string; } ⋮---- -/** - * Advanced Earn — Dual Asset product (GET /v5/earn/advance/product). - */ -export interface AdvanceEarnDualAssetProductV5 { - category: string; - productId: string; - baseCoin: string; - quoteCoin: string; - expectReceiveAt: string; - duration: string; - status: 'Available' | 'NotAvailable'; - isVipProduct: boolean; - subscribeStartAt: string; - subscribeEndAt: string; - applyStartAt: string; - settlementTime: string; - minPurchaseQuoteAmount: string; - minPurchaseBaseAmount: string; - remainingAmountQuote: string; - remainingAmountBase: string; - orderPrecisionDigitalQuote: number; - orderPrecisionDigitalBase: number; +export interface SubmitDepositOriginatorInfoResultV5 { + travelRuleStatus: number; } ⋮---- -export interface AdvanceEarnDualAssetProductInfoV5 { - category: string; - list: AdvanceEarnDualAssetProductV5[]; +export interface InternalDepositRecordV5 { + id: string; + type: 1; + coin: string; + amount: string; + status: 1 | 2 | 3; + address: string; + createdTime: string; + txID: string; + complianceStatus?: string; } ⋮---- -/** - * Advanced Earn — Double Win (GET /v5/earn/advance/product?category=DoubleWin). - */ -export interface AdvanceEarnDoubleWinProductV5 { - category: string; - productId: string; - investCoin: string; - underlyingAsset: string; - duration: string; - subscribeStartAt: string; - subscribeEndAt: string; - settlementTime: string; - expectReceiveAt: string; - minPurchaseAmount: string; - orderPrecisionDigital: number; - isRfqProduct: boolean; - lowerPriceBuffer: string; - upperPriceBuffer: string; - minDeviationRatio: string; - maxDeviationRatio: string; - priceTickSize: string; +export interface DepositAddressChainV5 { + chainType: string; + addressDeposit: string; + tagDeposit: string; + chain: string; + batchReleaseLimit: string; + contractAddress: string; } ⋮---- -/** - * Advanced Earn — Smart Leverage (GET /v5/earn/advance/product?category=SmartLeverage). - */ -export interface AdvanceEarnSmartLeverageProductV5 { - category: string; - productId: string; - investCoin: string; - underlyingAsset: string; - direction: 'Long' | 'Short'; - leverage: string; - duration: string; - subscribeStartAt: string; - subscribeEndAt: string; - settlementTime: string; - expectReceiveAt: string; - minPurchaseAmount: string; - remainingAmount: string; - orderPrecisionDigital: number; +export interface DepositAddressResultV5 { + coin: string; + chains: DepositAddressChainV5[]; } ⋮---- -/** - * Advanced Earn — Discount Buy (GET /v5/earn/advance/product?category=DiscountBuy). - */ -export interface AdvanceEarnDiscountBuyProductV5 { - category: string; - productId: string; +export interface CoinInfoV5 { + name: string; coin: string; - underlyingAsset: string; - settlementTime: string; - duration: string; - isVipProduct: boolean; - subscribeStartAt: string; - subscribeEndAt: string; - minPurchaseAmount: string; - remainingAmount: string; - orderPrecisionDigital: number; - expectReceiveAt: string; + /** @deprecated Use `chains[].withdrawMax` instead */ + remainAmount: string; + chains: { + chain: string; + chainType: string; + confirmation: string; + withdrawFee: string; + depositMin: string; + withdrawMin: string; + minAccuracy: string; + chainDeposit: string; + chainWithdraw: string; + withdrawPercentageFee: string; + contractAddress: string; + safeConfirmNumber: string; + /** Max withdraw amount per transaction per chain. `-1` means no limit */ + withdrawMax: string; + }[]; } ⋮---- -export type AdvanceEarnAdvanceProductListItemV5 = - | AdvanceEarnDualAssetProductV5 - | AdvanceEarnDoubleWinProductV5 - | AdvanceEarnSmartLeverageProductV5 - | AdvanceEarnDiscountBuyProductV5; -⋮---- -export interface AdvanceEarnAdvanceProductInfoV5 { - category: string; - list: AdvanceEarnAdvanceProductListItemV5[]; -} +/** @deprecated Use `chains[].withdrawMax` instead */ ⋮---- -/** GET /v5/earn/hold-to-earn/product — Hold to Earn airdrop products */ -export type HoldToEarnAirdropProductStatusV5 = - | 'NotStarted' - | 'Online' - | 'Ended'; +/** Max withdraw amount per transaction per chain. `-1` means no limit */ ⋮---- -export interface HoldToEarnAirdropProductYieldV5 { - coinName: string; - /** Yesterday's APR for display, e.g. "10%", "0%" */ - apy: string; - personalApy?: string; - multiplier?: string; +export interface WithdrawalRecordV5 { + withdrawId: string; + txID: string; + withdrawType: WithdrawalTypeV5; + coin: string; + chain: string; + amount: string; + withdrawFee: string; + status: string; + toAddress: string; + tag: string; + createTime: string; + updateTime: string; } ⋮---- -/** Yesterday's APR for display, e.g. "10%", "0%" */ +export interface WithdrawalAddressV5 { + coin: string; + chain: string; + address: string; + tag: string; + remark: string; + status: number; + addressType: number; + verified: number; + createdAt: string; +} ⋮---- -export interface HoldToEarnAirdropProductV5 { - coinName: string; - yields: HoldToEarnAirdropProductYieldV5[]; - status: HoldToEarnAirdropProductStatusV5; - announcementUrl: string; - /** Yesterday's avg APR across yield coins */ - apy: string; - personalApy?: string; +export interface WithdrawableAccountSliceV5 { + coin: string; + withdrawableAmount: string; + availableBalance: string; } ⋮---- -/** Yesterday's avg APR across yield coins */ +/** + * GET /v5/asset/withdraw/withdrawable-amount. Only keys with data are returned + * (e.g. UTA, FUND, EARN; EARN when the coin can be withdrawn from Earn; SPOT if present). + */ +export interface WithdrawableAmountV5 { + limitAmountUsd: string; + withdrawableAmount: { + SPOT?: WithdrawableAccountSliceV5; + FUND?: WithdrawableAccountSliceV5; + UTA?: WithdrawableAccountSliceV5; + EARN?: WithdrawableAccountSliceV5; + }; +} ⋮---- -export interface HoldToEarnAirdropProductsResultV5 { - products: HoldToEarnAirdropProductV5[]; +export interface VaspEntityV5 { + vaspEntityId: string; + vaspName: string; } ⋮---- -/** GET /v5/earn/hold-to-earn/yield-history */ -export interface HoldToEarnAirdropDailyPnlV5 { - coinName: string; - yieldCoinName: string; - effectiveAmount: string; - pnl: string; - apy: string; - createdAt: number; +export interface ConvertCoinSpecV5 { + coin: string; + fullName: string; + icon: string; + iconNight: string; + accuracyLength: number; + coinType: string; + balance: string; + uBalance: string; + singleFromMinLimit: string; + singleFromMaxLimit: string; + disableFrom: boolean; + disableTo: boolean; + timePeriod: number; + singleToMinLimit: string; + singleToMaxLimit: string; + dailyFromMinLimit: string; + dailyFromMaxLimit: string; + dailyToMinLimit: string; + dailyToMaxLimit: string; } ⋮---- -export interface HoldToEarnAirdropYieldHistoryResultV5 { - nextCursor: string; - airdropDailyPnls: HoldToEarnAirdropDailyPnlV5[]; +export interface ConvertQuoteV5 { + quoteTxId: string; + exchangeRate: string; + fromCoin: string; + fromCoinType: string; + toCoin: string; + toCoinType: string; + fromAmount: string; + toAmount: string; + expiredTime: string; + requestId: string; + extTaxAndFee: string[]; } - -================ -File: src/types/response/v5-user.ts -================ -import { PermissionsV5 } from '../shared-v5'; ⋮---- -export interface CreateSubMemberResultV5 { - uid: string; - username: string; - memberType: number; - status: number; - remark: string; +export interface ConvertStatusV5 { + accountType: string; + exchangeTxId: string; + userId: string; + fromCoin: string; + fromCoinType: string; + toCoin: string; + toCoinType: string; + fromAmount: string; + toAmount: string; + exchangeStatus: 'init' | 'processing' | 'success' | 'failure'; + extInfo: { paramType: string; paramValue: string }; + convertRate: string; + createdAt: string; } ⋮---- -export interface CreateSubApiKeyResultV5 { - id: string; - note: string; - apiKey: string; - readOnly: number; - secret: string; - permissions: PermissionsV5; +export interface ConvertHistoryRecordV5 { + accountType: string; + exchangeTxId: string; + userId: string; + fromCoin: string; + fromCoinType: string; + toCoin: string; + toCoinType: string; + fromAmount: string; + toAmount: string; + exchangeStatus: 'init' | 'processing' | 'success' | 'failure'; + extInfo: { paramType: string; paramValue: string }; + convertRate: string; + createdAt: string; } ⋮---- -export interface SubMemberV5 { - uid: string; - username: string; - memberType: number; - status: number; - accountMode: number; - remark: string; +export interface SmallBalanceCoinV5 { + fromCoin: string; // Source currency + supportConvert: 1 | 2; // 1: support, 2: not supported + availableBalance: string; // Available balance + baseValue: string; // USDT equivalent value + toAmount: string; // Reserved field + exchangeRate: string; // Reserved field + feeInfo: null; // Reserved field + taxFeeInfo: null; // Reserved field } -export type ApiKeyType = 1 | 2; ⋮---- -export interface ApiKeyPermissionsV5 { - ContractTrade: string[]; - Spot: string[]; - Wallet: string[]; - Options: string[]; - Derivatives: string[]; - CopyTrading: string[]; - BlockTrade: string[]; - Exchange: string[]; - NFT: string[]; - Affiliate: string[]; - Earn?: string[]; - FiatP2P?: string[]; - FiatBitPay?: string[]; - FiatConvertBroker?: string[]; - /** @deprecated */ - FiatGlobalPay?: string[]; - BitCard?: string[]; - ByXPost?: string[]; +fromCoin: string; // Source currency +supportConvert: 1 | 2; // 1: support, 2: not supported +availableBalance: string; // Available balance +baseValue: string; // USDT equivalent value +toAmount: string; // Reserved field +exchangeRate: string; // Reserved field +feeInfo: null; // Reserved field +taxFeeInfo: null; // Reserved field +⋮---- +export interface SmallBalanceListV5 { + smallAssetCoins: SmallBalanceCoinV5[]; // Small balance info + supportToCoins: string[]; // Supported target coins (e.g., ["MNT","USDT","USDC"]) } ⋮---- -/** @deprecated */ +smallAssetCoins: SmallBalanceCoinV5[]; // Small balance info +supportToCoins: string[]; // Supported target coins (e.g., ["MNT","USDT","USDC"]) ⋮---- -export interface ApiKeyInfoV5 { - id: string; - note: string; - apiKey: string; - readOnly: 0 | 1; - secret: string; - permissions: ApiKeyPermissionsV5; - ips: string[]; - type: 1 | 2; // 1: personal, 2: connected to third-party app - deadlineDay: number; - expiredAt: string; - createdAt: string; - /** @deprecated */ - unified: number; - uta: 0 | 1; // 0: regular account, 1: unified trade account - userID: number; - inviterID: number; - vipLevel: string; - mktMakerLevel: string; - affiliateID: number; - rsaPublicKey: string; - isMaster: boolean; - parentUid: string; - kycLevel: 'LEVEL_DEFAULT' | 'LEVEL_1' | 'LEVEL_2'; - kycRegion: string; - isFixApi?: boolean; +export interface FiatCoinInfoV5 { + coin: string; // Fiat coin code + fullName: string; // Fiat full coin name + icon: string; // Coin icon url + iconNight: string; // Coin icon url (dark mode) + precision: number; // Fiat precision + disable: boolean; // true: the coin is disabled, false: the coin is allowed + singleFromMinLimit: string; // For buy side, minimum amount of fiatCoin per transaction + singleFromMaxLimit: string; // For buy side, maximum amount of fiatCoin per transaction } ⋮---- -type: 1 | 2; // 1: personal, 2: connected to third-party app -⋮---- -/** @deprecated */ -⋮---- -uta: 0 | 1; // 0: regular account, 1: unified trade account +coin: string; // Fiat coin code +fullName: string; // Fiat full coin name +icon: string; // Coin icon url +iconNight: string; // Coin icon url (dark mode) +precision: number; // Fiat precision +disable: boolean; // true: the coin is disabled, false: the coin is allowed +singleFromMinLimit: string; // For buy side, minimum amount of fiatCoin per transaction +singleFromMaxLimit: string; // For buy side, maximum amount of fiatCoin per transaction ⋮---- -export interface UpdateApiKeyResultV5 { - id: string; - note: string; - apiKey: string; - readOnly: 0 | 1; - secret: string; - permissions: PermissionsV5; - ips: string[]; +export interface CryptoCoinInfoV5 { + coin: string; // Crypto coin code + fullName: string; // Crypto full coin name + icon: string; // Coin icon url + iconNight: string; // Coin icon url (dark mode) + precision: number; // Crypto precision + disable: boolean; // true: the coin is disabled, false: the coin is allowed + singleFromMinLimit: string; // For sell side, minimum amount of cryptoCoin per transaction + singleFromMaxLimit: string; // For sell side, maximum amount of cryptoCoin per transaction } ⋮---- -export interface SubAccountAllApiKeysResultV5 { - result: { - id: string; - ips?: string[]; - apiKey: string; - note: string; - status: number; - expiredAt?: string; - createdAt: string; - type: ApiKeyType; - permissions: PermissionsV5; - secret: string; - readOnly: 0 | 1; - deadlineDay?: number; - flag: string; - }[]; - nextPageCursor: string; -} +coin: string; // Crypto coin code +fullName: string; // Crypto full coin name +icon: string; // Coin icon url +iconNight: string; // Coin icon url (dark mode) +precision: number; // Crypto precision +disable: boolean; // true: the coin is disabled, false: the coin is allowed +singleFromMinLimit: string; // For sell side, minimum amount of cryptoCoin per transaction +singleFromMaxLimit: string; // For sell side, maximum amount of cryptoCoin per transaction ⋮---- -export interface AffiliateUserListItemV5 { - userId: string; - registerTime: string; - source: string; - remarks: string; - isKyc: boolean; - takerVol30Day: string; - makerVol30Day: string; - tradeVol30Day: string; - depositAmount30Day: string; - takerVol365Day: string; - makerVol365Day: string; - tradeVol365Day: string; - depositAmount365Day: string; - takerVol: string; - makerVol: string; - tradeVol: string; - startDate: string; - endDate: string; - /** tradfi trade volume in [startDate, endDate] when startDate/endDate in params */ - tradfiTradeVol?: string; - /** tradfi trade volume in last 30 days. 0 when startDate/endDate in params */ - tradfiTradeVol30Day?: string; - /** tradfi trade volume in past year. 0 when startDate/endDate in params */ - tradfiTradeVol365Day?: string; - /** Commission between startDate and endDate when startDate/endDate in params. Coin -> amount */ - commissionsVol?: Record; - /** Commission in last 30 days. Coin -> amount */ - commissions30Day?: Record; - /** Commission in past year. Coin -> amount */ - commissions365Day?: Record; +export interface FiatTradingPairListV5 { + fiats: FiatCoinInfoV5[]; // Fiat coin list + cryptos: CryptoCoinInfoV5[]; // Crypto coin list } ⋮---- -/** tradfi trade volume in [startDate, endDate] when startDate/endDate in params */ -⋮---- -/** tradfi trade volume in last 30 days. 0 when startDate/endDate in params */ -⋮---- -/** tradfi trade volume in past year. 0 when startDate/endDate in params */ -⋮---- -/** Commission between startDate and endDate when startDate/endDate in params. Coin -> amount */ -⋮---- -/** Commission in last 30 days. Coin -> amount */ -⋮---- -/** Commission in past year. Coin -> amount */ +fiats: FiatCoinInfoV5[]; // Fiat coin list +cryptos: CryptoCoinInfoV5[]; // Crypto coin list ⋮---- -export interface AffiliateUserInfoV5 { - uid: string; - vipLevel: string; - takerVol30Day: string; - makerVol30Day: string; - tradeVol30Day: string; - depositAmount30Day: string; - takerVol365Day: string; - makerVol365Day: string; - tradeVol365Day: string; - depositAmount365Day: string; - totalWalletBalance: '1' | '2' | '3' | '4'; - depositUpdateTime: string; - volUpdateTime: string; - KycLevel: 0 | 1 | 2; - /** tradfi trade volume in last 30 days (USDT) */ - tradfiTradeVol30Day?: string; - /** tradfi trade volume in past year (USDT) */ - tradfiTradeVol365Day?: string; - /** tradfi commissions in last 30 days. Coin -> amount */ - commissions30Day?: Record; - /** tradfi commissions in past year. Coin -> amount */ - commissions365Day?: Record; - /** Payment amount in the last 30 days */ - paySendAmount30Day: string; - /** Pay first transaction amount */ - payFtt: string; - /** Card first-time transaction amount */ - cardFtt: string; +export interface FundingAccountTransactionRecordV5 { + memberId: string; + currency: string; + ioDirection: string; + txnAmt: string; + afterAmt: string; + createTime: string; + showBusiType: string; + showBusiTypeEn: string; + description: string; + descriptionEn: string; + currcCursor?: string; } ⋮---- -/** tradfi trade volume in last 30 days (USDT) */ -⋮---- -/** tradfi trade volume in past year (USDT) */ -⋮---- -/** tradfi commissions in last 30 days. Coin -> amount */ -⋮---- -/** tradfi commissions in past year. Coin -> amount */ +/** When accountType=Alpha and category is farm, under `coinDetail` in sub-categories. */ +export interface AssetOverviewCoinExtMapV5 { + priceUpper?: string; + priceLower?: string; + equityUnit?: string; +} ⋮---- -/** Payment amount in the last 30 days */ +export interface AssetOverviewCoinDetailV5 { + coin: string; + equity: string; + extMap?: AssetOverviewCoinExtMapV5; +} ⋮---- -/** Pay first transaction amount */ +export interface AssetOverviewCategoryV5 { + category: string; + equity: string; + coinDetail: AssetOverviewCoinDetailV5[]; +} ⋮---- -/** Card first-time transaction amount */ +export interface AssetOverviewAccountItemV5 { + accountType: string; + totalEquity: string; + valuationCurrency: string; + snapshotTime: string; + coinDetail?: AssetOverviewCoinDetailV5[]; + categories?: AssetOverviewCategoryV5[]; +} ⋮---- -export interface AffiliateSubAffiliateListItemV5 { - subAffId: string; - userId: string; - name: string; - email: string; - /** Commission per currency (BTC, ETH, MNT, USDC, USDT) for the queried date range */ - commissionsVol: Record; - commissionsForUsdt: string; - becameAffTime: string; - startDate: string; - endDate: string; +export interface AssetOverviewResultV5 { + totalEquity: string; + list: AssetOverviewAccountItemV5[]; } ⋮---- -/** Commission per currency (BTC, ETH, MNT, USDC, USDT) for the queried date range */ +// --- GET /v5/asset/portfolio-margin (portfolio margin P&L ranges) --- ⋮---- -export interface AffiliateSubAffiliateListResultV5 { - list: AffiliateSubAffiliateListItemV5[]; - nextPageCursor: string; +export interface PortfolioMarginWalletV5 { + equity: string; + cashBalance: string; + marginBalance: string; + availableBalance: string; + accountIM: string; + accountMM: string; + accountMMRate: string; + accountIMRate: string; } ⋮---- -export interface FriendReferralRecordV5 { - id: string; - inviteeUid: string; - status: number; - createdAt: string; - updatedAt: string; +export interface PortfolioMarginPnlRangePointV5 { + priceScale: string; + pnls: string[]; } ⋮---- -export interface ReferralCodeItemV5 { - referralCode: string; - referralLink: string; - scene: number; +export interface PortfolioMarginContractBucketPnlV5 { + pnlRanges: PortfolioMarginPnlRangePointV5[]; } ⋮---- -export interface ReferralCodesResultV5 { - referralCodes: ReferralCodeItemV5[]; +export interface PortfolioMarginTotalPnlRangesV5 { + ALL?: PortfolioMarginContractBucketPnlV5; + PERPETUAL?: PortfolioMarginContractBucketPnlV5; + OPTION?: PortfolioMarginContractBucketPnlV5; } - -================ -File: src/types/websockets/ws-events.ts -================ -import WebSocket from 'isomorphic-ws'; -⋮---- -import { - RFQItemV5, - RFQPublicTradeV5, - RFQQuoteItemV5, - RFQTradeV5, -} from '../response/v5-rfq'; -import { - CategoryV5, - ExecTypeV5, - OCOTriggerTypeV5, - OrderCancelTypeV5, - OrderCreateTypeV5, - OrderRejectReasonV5, - OrderSideV5, - OrderSMPTypeV5, - OrderStatusV5, - OrderTimeInForceV5, - OrderTriggerByV5, - OrderTypeV5, - PositionIdx, - PositionSideV5, - PositionStatusV5, - StopOrderTypeV5, - SystemStatusItemV5, - TPSLModeV5, - TradeModeV5, -} from '../shared-v5'; -import { WsKey } from './ws-general'; ⋮---- -export interface MessageEventLike { - target: WebSocket; - type: 'message'; - data: string; +export interface PortfolioMarginPerpPositionPnlV5 { + symbolName: string; + position: string; + pnlRanges: PortfolioMarginPnlRangePointV5[]; + sessionAvgPrice: string; + markPrice: string; + orderSize: string; + contractType: number; + settleCoin: string; + symbolAlias?: string; } ⋮---- -export function isMessageEvent(msg: unknown): msg is MessageEventLike -⋮---- -export interface WSPublicTopicEventV5 { - id?: string; - topic: TTopic; - type: TType; - /** Cross sequence */ - cs?: number; - /** Event timestamp */ - ts: number; - data: TData; - /** - * matching engine timestamp (correlated with T from public trade channel) - */ - cts: number; - /** - * Internal reference, can be used to determine if this is spot/linear/inverse/etc - */ - wsKey: WsKey; +export interface PortfolioMarginOptionPositionPnlV5 { + symbolName: string; + position: string; + pnlRanges: PortfolioMarginPnlRangePointV5[]; + sessionAvgPrice: string; + markPrice: string; + orderSize: string; + contractType: number; + settleCoin: string; } ⋮---- -/** Cross sequence */ -⋮---- -/** Event timestamp */ -⋮---- -/** - * matching engine timestamp (correlated with T from public trade channel) - */ -⋮---- -/** - * Internal reference, can be used to determine if this is spot/linear/inverse/etc - */ +export interface PortfolioMarginOptionExpiryPnlV5 { + expiryDateRepresentation: string; + pnlRanges: PortfolioMarginPnlRangePointV5[]; + optionPositionPnlRanges: PortfolioMarginOptionPositionPnlV5[]; +} ⋮---- -export interface WSPrivateTopicEventV5 { - id?: string; - topic: TTopic; - creationTime: number; - data: TData; - wsKey: WsKey; +export interface PortfolioMarginContingencyV5 { + optionContingency: string; + futureDeltaContingency: string; + optionVegaContingency: string; + contingencyComponents: string; + usdtUsdcContingency: string; + futureContingency: string; } ⋮---- -export interface WSOrderbookV5 { - /** Symbol */ - s: string; - /** [price, qty][] */ - b: [string, string][]; - /** [price, qty][] */ - a: [string, string][]; - /** Update ID */ - u: number; - /** Cross sequence */ - seq: number; +export interface PortfolioMarginAssetBlockV5 { + coin: string; + assetIM: string; + assetMM: string; } ⋮---- -/** Symbol */ +export interface PortfolioMarginSpotHedgeInfoV5 { + hedgeSpotSize: string; + walletBalance: string; + usdIndexPrice: string; + pnlRanges: PortfolioMarginPnlRangePointV5[]; +} ⋮---- -/** [price, qty][] */ +export interface PortfolioMarginByBaseCoinV5 { + baseCoin: string; + totalPnlRanges: PortfolioMarginTotalPnlRangesV5; + perpPositionPnlRanges: PortfolioMarginPerpPositionPnlV5[]; + optionExpiryDatePnlRanges: PortfolioMarginOptionExpiryPnlV5[]; + contingency: PortfolioMarginContingencyV5; + asset: PortfolioMarginAssetBlockV5; + maxLossPriceMove: string; + maxLossIvShock: string; + totalClosePzFee: string; + spotHedgeInfo: PortfolioMarginSpotHedgeInfoV5; + maxLossIvShockList: string[]; +} ⋮---- -/** [price, qty][] */ +export interface PortfolioMarginInfoResultV5 { + wallet: PortfolioMarginWalletV5; + assetPnlRange: PortfolioMarginByBaseCoinV5[]; +} ⋮---- -/** Update ID */ +// --- GET /v5/asset/total-members-assets --- ⋮---- -/** Cross sequence */ +export interface TotalMembersAccountBreakdownItemV5 { + type: string; + origb: string; + quoteb: string; + stat: number; +} ⋮---- -export type WSOrderbookEventV5 = WSPublicTopicEventV5< - string, - 'delta' | 'snapshot', - WSOrderbookV5 ->; +export interface TotalMembersMemberEntryV5 { + uid: number; + isM?: boolean; + type?: number; + stat: number; + origb: string; + quoteb?: string; + items: TotalMembersAccountBreakdownItemV5[]; +} ⋮---- -export interface WSTradeV5 { - T: number; - s: string; - S: OrderSideV5; - v: string; - p: string; - L?: string; - i: string; - BT: boolean; - RPI?: boolean; - mP?: string; - iP?: string; - mIv?: string; - iv?: string; +export interface TotalMembersAssetsResultV5 { + total: string; + quoteTotal: string; + stat: number; + list: TotalMembersMemberEntryV5[]; +} + +================ +File: src/types/response/v5-earn.ts +================ +export interface EarnInterestCardV5 { + awardId: number; + specCode: string; + coin: string; + apy: string; + duration: number; + claimedAt: number; + expireAt: number; + usedAt: number; + status: 'InUse' | 'NotUse' | 'Expired' | 'AlreadyUsed' | string; + currentPnl: string; + limitPnl: string; + positionEffectiveAmount: string; + productId: number; + category: 'FlexibleSaving' | 'DualAssets' | string; } ⋮---- -export type WSTradeEventV5 = WSPublicTopicEventV5< - string, - 'snapshot', - WSTradeV5[] ->; +export interface EarnAwardCardV5 { + awardId: number; + specCode: string; + claimedAt: number; + usedAt: number; + expireAt: number; + status: 'InUse' | 'NotUse' | 'Expired' | 'AlreadyUsed' | string; + amount: string; + limitPnlPercentage: string; + baseCoin: string; + quoteCoin: string; + direction: 1 | 2; + category: 'FlexibleSaving' | 'DualAssets' | string; +} ⋮---- -export interface WSEventOrderbookV5 { - s: string; - r: [string, string][]; - u: number; - seq: number; +export interface EarnCouponListResultV5 { + interestCards: EarnInterestCardV5[]; + awardCards: EarnAwardCardV5[]; } ⋮---- -export type WSEventOrderbookEventV5 = WSPublicTopicEventV5< - string, - 'delta' | 'snapshot', - WSEventOrderbookV5 ->; +export interface FlexibleSavingAutoSavingsCoinV5 { + coin: string; + isSelected: boolean; + maxStakingAmount: string; + apr: string; +} ⋮---- -export interface WSEventPublicTradeV5 { - T: number; - s: string; - r: string; - a: string; - i: string; - seq: number; +export interface FlexibleSavingAutoSavingsV5 { + selectedAll: boolean; + coins: FlexibleSavingAutoSavingsCoinV5[]; } ⋮---- -export type WSEventPublicTradeEventV5 = WSPublicTopicEventV5< - string, - 'snapshot', - WSEventPublicTradeV5[] ->; +export interface EarnProductV5 { + category: string; + estimateApr: string; + coin: string; + minStakeAmount: string; + maxStakeAmount: string; + precision: string; + productId: string; + status: 'Available' | 'NotAvailable'; +} ⋮---- -/** - * WSTickerV5 is the data structure for the "linear" ticker channel - * */ -export interface WSTickerV5 { - symbol: string; - tickDirection: string; - price24hPcnt: string; - lastPrice: string; - prevPrice24h: string; - highPrice24h: string; - lowPrice24h: string; - prevPrice1h: string; - markPrice: string; - indexPrice: string; - openInterest: string; - openInterestValue: string; - singleOpenInterest?: string; - singleOpenInterestValue?: string; - turnover24h: string; - volume24h: string; - nextFundingTime: string; - fundingRate: string; - bid1Price: string; - bid1Size: string; - ask1Price: string; - ask1Size: string; - deliveryTime?: string; - basisRate?: string; - deliveryFeeRate?: string; - predictedDeliveryPrice?: string; - preOpenPrice?: string; - preQty?: string; - curPreListingPhase?: string; - fundingIntervalHour?: string; - fundingCap?: string; - basisRateYear?: string; +export interface EarnOrderHistoryV5 { + coin: string; + orderValue: string; + orderType: 'Redeem' | 'Stake'; + orderId: string; + orderLinkId: string; + status: 'Success' | 'Fail' | 'Pending'; + createdAt: string; + productId: string; + updatedAt: string; + swapOrderValue: string; + estimateRedeemTime: string; + estimateStakeTime: string; } ⋮---- -export interface WSTickerOptionV5 { - symbol: string; - bidPrice: string; - bidSize: string; - bidIv: string; - askPrice: string; - askSize: string; - askIv: string; - lastPrice: string; - highPrice24h: string; - lowPrice24h: string; - markPrice: string; - indexPrice: string; - markPriceIv: string; - underlyingPrice: string; - openInterest: string; - turnover24h: string; - volume24h: string; - totalVolume: string; - totalTurnover: string; - delta: string; - gamma: string; - vega: string; - theta: string; - predictedDeliveryPrice: string; - change24h: string; +export interface EarnPositionFreezeDetailV5 { + amount: string; + description: string; } ⋮---- -export interface WSTickerSpotV5 { - symbol: string; - lastPrice: string; - highPrice24h: string; - lowPrice24h: string; - prevPrice24h: string; - volume24h: string; - turnover24h: string; - price24hPcnt: string; - usdIndexPrice: string; +export interface EarnPositionV5 { + coin: string; + productId: string; + amount: string; + totalPnl: string; + claimableYield: string; + id?: string; + status?: string; + orderId?: string; + estimateRedeemTime?: string; + estimateStakeTime?: string; + estimateInterestCalculationTime?: string; + settlementTime?: string; + autoReinvest?: string; + /** Redeemable amount */ + availableAmount: string; + freezeDetails: EarnPositionFreezeDetailV5[]; } ⋮---- -export type WSTickerEventV5 = WSPublicTopicEventV5< - string, - 'snapshot' | 'delta', - WSTickerV5 | WSTickerOptionV5 | WSTickerSpotV5 ->; +/** Redeemable amount */ ⋮---- -export interface WSKlineV5 { - start: number; - end: number; - interval: string; - open: string; - close: string; - high: string; - low: string; - volume: string; - turnover: string; - confirm: boolean; - timestamp: number; +export interface EarnYieldHistoryV5 { + productId: string; + coin: string; + id: string; + amount: string; + yieldType: string; + distributionMode: string; + effectiveStakingAmount: string; + orderId: string; + status: 'Pending' | 'Success' | 'Fail'; + createdAt: string; } ⋮---- -export type WSKlineEventV5 = WSPublicTopicEventV5< - string, - 'snapshot', - WSKlineV5[] ->; -⋮---- -export interface WSLiquidationV5 { - T: number; - s: string; - S: OrderSideV5; - v: string; - p: string; +export interface EarnHourlyYieldHistoryV5 { + productId: string; + coin: string; + id: string; + amount: string; + effectiveStakingAmount: string; + status: 'Pending' | 'Success' | 'Fail'; + hourlyDate: string; + createdAt: string; } ⋮---- -export type WSLiquidationEventV5 = WSPublicTopicEventV5< - string, - 'snapshot', - WSLiquidationV5[] ->; +export interface EarnAprHistoryPointV5 { + timestamp: string; + apr: string; +} ⋮---- -export interface WSPositionV5 { +/** + * Advanced Earn — Dual Asset product (GET /v5/earn/advance/product). + */ +export interface AdvanceEarnDualAssetProductV5 { category: string; - symbol: string; - side: PositionSideV5; - size: string; - positionIdx: PositionIdx; - tradeMode: TradeModeV5; - positionValue: string; - riskId: number; - riskLimitValue: string; - entryPrice: string; - markPrice: string; - leverage: string; - breakEvenPrice?: string; // Break even price, only for linear & inverse - positionBalance: string; - autoAddMargin: number; - positionMM: string; - positionIM: string; - positionIMByMp: string; - positionMMByMp: string; - liqPrice: string; - bustPrice: string; - tpslMode: string; - takeProfit: string; - stopLoss: string; - trailingStop: string; - unrealisedPnl: string; - curRealisedPnl: string; - sessionAvgPrice: string; - delta: string; - gamma: string; - vega: string; - theta: string; - cumRealisedPnl: string; - positionStatus: PositionStatusV5; - adlRankIndicator: number; - isReduceOnly: boolean; - mmrSysUpdatedTime: string; - leverageSysUpdatedTime: string; - createdTime: string; - updatedTime: string; - /** Position open timestamp (ms). Default `0` when not set. */ - openTime: number; - seq: number; - netDeltaRatio?: string; + productId: string; + baseCoin: string; + quoteCoin: string; + expectReceiveAt: string; + duration: string; + status: 'Available' | 'NotAvailable'; + isVipProduct: boolean; + subscribeStartAt: string; + subscribeEndAt: string; + applyStartAt: string; + settlementTime: string; + minPurchaseQuoteAmount: string; + minPurchaseBaseAmount: string; + remainingAmountQuote: string; + remainingAmountBase: string; + orderPrecisionDigitalQuote: number; + orderPrecisionDigitalBase: number; } ⋮---- -breakEvenPrice?: string; // Break even price, only for linear & inverse -⋮---- -/** Position open timestamp (ms). Default `0` when not set. */ -⋮---- -export type WSPositionEventV5 = WSPrivateTopicEventV5< - 'position', - WSPositionV5[] ->; +export interface AdvanceEarnDualAssetProductInfoV5 { + category: string; + list: AdvanceEarnDualAssetProductV5[]; +} ⋮---- -export interface WSEventPositionV5 { - symbol: string; - baseCoin: string; - settleCoin: string; - side: string; - ecContractType: string; - ecDirection: string; - avgPayoutRatio: string; - positionValue: string; - ecSettleTime: string; - cumClosedPnl: string; - createdTime: string; - updatedTime: string; - seq: number; +/** + * Advanced Earn — Double Win (GET /v5/earn/advance/product?category=DoubleWin). + */ +export interface AdvanceEarnDoubleWinProductV5 { + category: string; + productId: string; + investCoin: string; + underlyingAsset: string; + duration: string; + subscribeStartAt: string; + subscribeEndAt: string; + settlementTime: string; + expectReceiveAt: string; + minPurchaseAmount: string; + orderPrecisionDigital: number; + isRfqProduct: boolean; + lowerPriceBuffer: string; + upperPriceBuffer: string; + minDeviationRatio: string; + maxDeviationRatio: string; + priceTickSize: string; } ⋮---- -export type WSEventPositionEventV5 = WSPrivateTopicEventV5< - 'position.event', - WSEventPositionV5[] ->; +/** + * Advanced Earn — Smart Leverage (GET /v5/earn/advance/product?category=SmartLeverage). + */ +export interface AdvanceEarnSmartLeverageProductV5 { + category: string; + productId: string; + investCoin: string; + underlyingAsset: string; + direction: 'Long' | 'Short'; + leverage: string; + duration: string; + subscribeStartAt: string; + subscribeEndAt: string; + settlementTime: string; + expectReceiveAt: string; + minPurchaseAmount: string; + remainingAmount: string; + orderPrecisionDigital: number; +} ⋮---- -export interface WSAccountOrderV5 { - category: CategoryV5; - orderId: string; - orderLinkId: string; - parentOrderLinkId?: string; // Linked parent order for attached TP/SL orders (futures & options) - isLeverage: string; - blockTradeId: string; - symbol: string; - price: string; - qty: string; - side: OrderSideV5; - positionIdx: PositionIdx; - orderStatus: OrderStatusV5; - createType: OrderCreateTypeV5; - cancelType: OrderCancelTypeV5; - rejectReason?: OrderRejectReasonV5; - avgPrice?: string; - leavesQty?: string; - leavesValue?: string; - cumExecQty: string; - cumExecValue: string; - cumExecFee: string; - closedPnl: string; - feeCurrency: string; - timeInForce: OrderTimeInForceV5; - orderType: OrderTypeV5; - stopOrderType: StopOrderTypeV5; - ocoTriggerType?: OCOTriggerTypeV5; - orderIv: string; - marketUnit?: 'baseCoin' | 'quoteCoin'; - triggerPrice: string; - takeProfit: string; - stopLoss: string; - tpslMode?: TPSLModeV5; - tpLimitPrice?: string; - slLimitPrice?: string; - tpTriggerBy: string; - slTriggerBy: string; - triggerDirection: number; - triggerBy: OrderTriggerByV5; - lastPriceOnCreated: string; - reduceOnly: boolean; - closeOnTrigger: boolean; - placeType: string; - smpType: OrderSMPTypeV5; - smpGroup: string; - smpOrderId: string; - createdTime: string; - updatedTime: string; - cumFeeDetail?: Record; // Cumulative trading fee details instead of cumExecFee and feeCurrency - rpiTakerAccess?: boolean; - rpiMatchedQty?: string; +/** + * Advanced Earn — Discount Buy (GET /v5/earn/advance/product?category=DiscountBuy). + */ +export interface AdvanceEarnDiscountBuyProductV5 { + category: string; + productId: string; + coin: string; + underlyingAsset: string; + settlementTime: string; + duration: string; + isVipProduct: boolean; + subscribeStartAt: string; + subscribeEndAt: string; + minPurchaseAmount: string; + remainingAmount: string; + orderPrecisionDigital: number; + expectReceiveAt: string; +} +⋮---- +export type AdvanceEarnAdvanceProductListItemV5 = + | AdvanceEarnDualAssetProductV5 + | AdvanceEarnDoubleWinProductV5 + | AdvanceEarnSmartLeverageProductV5 + | AdvanceEarnDiscountBuyProductV5; +⋮---- +export interface AdvanceEarnAdvanceProductInfoV5 { + category: string; + list: AdvanceEarnAdvanceProductListItemV5[]; +} +⋮---- +/** GET /v5/earn/hold-to-earn/product — Hold to Earn airdrop products */ +export type HoldToEarnAirdropProductStatusV5 = + | 'NotStarted' + | 'Online' + | 'Ended'; +⋮---- +export interface HoldToEarnAirdropProductYieldV5 { + coinName: string; + /** Yesterday's APR for display, e.g. "10%", "0%" */ + apy: string; + personalApy?: string; + multiplier?: string; +} +⋮---- +/** Yesterday's APR for display, e.g. "10%", "0%" */ +⋮---- +export interface HoldToEarnAirdropProductV5 { + coinName: string; + yields: HoldToEarnAirdropProductYieldV5[]; + status: HoldToEarnAirdropProductStatusV5; + announcementUrl: string; + /** Yesterday's avg APR across yield coins */ + apy: string; + personalApy?: string; +} +⋮---- +/** Yesterday's avg APR across yield coins */ +⋮---- +export interface HoldToEarnAirdropProductsResultV5 { + products: HoldToEarnAirdropProductV5[]; +} +⋮---- +/** GET /v5/earn/hold-to-earn/yield-history */ +export interface HoldToEarnAirdropDailyPnlV5 { + coinName: string; + yieldCoinName: string; + effectiveAmount: string; + pnl: string; + apy: string; + createdAt: number; +} +⋮---- +export interface HoldToEarnAirdropYieldHistoryResultV5 { + nextCursor: string; + airdropDailyPnls: HoldToEarnAirdropDailyPnlV5[]; +} + +================ +File: src/types/response/v5-user.ts +================ +import { + ReferralFriendStatusV5, + ReferralProductLineV5, +} from '../request/v5-user'; +import { PermissionsV5 } from '../shared-v5'; +⋮---- +export interface CreateSubMemberResultV5 { + uid: string; + username: string; + memberType: number; + status: number; + remark: string; } ⋮---- -parentOrderLinkId?: string; // Linked parent order for attached TP/SL orders (futures & options) +export interface CreateSubApiKeyResultV5 { + id: string; + note: string; + apiKey: string; + readOnly: number; + secret: string; + permissions: PermissionsV5; +} +⋮---- +export interface SubMemberV5 { + uid: string; + username: string; + memberType: number; + status: number; + accountMode: number; + remark: string; +} +export type ApiKeyType = 1 | 2; +⋮---- +export interface ApiKeyPermissionsV5 { + ContractTrade: string[]; + Spot: string[]; + Wallet: string[]; + Options: string[]; + Derivatives: string[]; + CopyTrading: string[]; + BlockTrade: string[]; + Exchange: string[]; + NFT: string[]; + Affiliate: string[]; + Earn?: string[]; + FiatP2P?: string[]; + FiatBitPay?: string[]; + FiatConvertBroker?: string[]; + /** @deprecated */ + FiatGlobalPay?: string[]; + BitCard?: string[]; + ByXPost?: string[]; +} +⋮---- +/** @deprecated */ +⋮---- +export interface ApiKeyInfoV5 { + id: string; + note: string; + apiKey: string; + readOnly: 0 | 1; + secret: string; + permissions: ApiKeyPermissionsV5; + ips: string[]; + type: 1 | 2; // 1: personal, 2: connected to third-party app + deadlineDay: number; + expiredAt: string; + createdAt: string; + /** @deprecated */ + unified: number; + uta: 0 | 1; // 0: regular account, 1: unified trade account + userID: number; + inviterID: number; + vipLevel: string; + mktMakerLevel: string; + affiliateID: number; + rsaPublicKey: string; + isMaster: boolean; + parentUid: string; + kycLevel: 'LEVEL_DEFAULT' | 'LEVEL_1' | 'LEVEL_2'; + kycRegion: string; + isFixApi?: boolean; +} +⋮---- +type: 1 | 2; // 1: personal, 2: connected to third-party app +⋮---- +/** @deprecated */ +⋮---- +uta: 0 | 1; // 0: regular account, 1: unified trade account +⋮---- +export interface UpdateApiKeyResultV5 { + id: string; + note: string; + apiKey: string; + readOnly: 0 | 1; + secret: string; + permissions: PermissionsV5; + ips: string[]; +} +⋮---- +export interface SubAccountAllApiKeysResultV5 { + result: { + id: string; + ips?: string[]; + apiKey: string; + note: string; + status: number; + expiredAt?: string; + createdAt: string; + type: ApiKeyType; + permissions: PermissionsV5; + secret: string; + readOnly: 0 | 1; + deadlineDay?: number; + flag: string; + }[]; + nextPageCursor: string; +} +⋮---- +export interface AffiliateUserListItemV5 { + userId: string; + registerTime: string; + source: string; + remarks: string; + isKyc: boolean; + takerVol30Day: string; + makerVol30Day: string; + tradeVol30Day: string; + depositAmount30Day: string; + takerVol365Day: string; + makerVol365Day: string; + tradeVol365Day: string; + depositAmount365Day: string; + takerVol: string; + makerVol: string; + tradeVol: string; + startDate: string; + endDate: string; + /** tradfi trade volume in [startDate, endDate] when startDate/endDate in params */ + tradfiTradeVol?: string; + /** tradfi trade volume in last 30 days. 0 when startDate/endDate in params */ + tradfiTradeVol30Day?: string; + /** tradfi trade volume in past year. 0 when startDate/endDate in params */ + tradfiTradeVol365Day?: string; + /** Commission between startDate and endDate when startDate/endDate in params. Coin -> amount */ + commissionsVol?: Record; + /** Commission in last 30 days. Coin -> amount */ + commissions30Day?: Record; + /** Commission in past year. Coin -> amount */ + commissions365Day?: Record; +} +⋮---- +/** tradfi trade volume in [startDate, endDate] when startDate/endDate in params */ +⋮---- +/** tradfi trade volume in last 30 days. 0 when startDate/endDate in params */ +⋮---- +/** tradfi trade volume in past year. 0 when startDate/endDate in params */ +⋮---- +/** Commission between startDate and endDate when startDate/endDate in params. Coin -> amount */ +⋮---- +/** Commission in last 30 days. Coin -> amount */ +⋮---- +/** Commission in past year. Coin -> amount */ +⋮---- +export interface AffiliateUserInfoV5 { + uid: string; + vipLevel: string; + takerVol30Day: string; + makerVol30Day: string; + tradeVol30Day: string; + depositAmount30Day: string; + takerVol365Day: string; + makerVol365Day: string; + tradeVol365Day: string; + depositAmount365Day: string; + totalWalletBalance: '1' | '2' | '3' | '4'; + depositUpdateTime: string; + volUpdateTime: string; + KycLevel: 0 | 1 | 2; + /** tradfi trade volume in last 30 days (USDT) */ + tradfiTradeVol30Day?: string; + /** tradfi trade volume in past year (USDT) */ + tradfiTradeVol365Day?: string; + /** tradfi commissions in last 30 days. Coin -> amount */ + commissions30Day?: Record; + /** tradfi commissions in past year. Coin -> amount */ + commissions365Day?: Record; + /** Payment amount in the last 30 days */ + paySendAmount30Day: string; + /** Pay first transaction amount */ + payFtt: string; + /** Card first-time transaction amount */ + cardFtt: string; +} +⋮---- +/** tradfi trade volume in last 30 days (USDT) */ +⋮---- +/** tradfi trade volume in past year (USDT) */ +⋮---- +/** tradfi commissions in last 30 days. Coin -> amount */ +⋮---- +/** tradfi commissions in past year. Coin -> amount */ +⋮---- +/** Payment amount in the last 30 days */ +⋮---- +/** Pay first transaction amount */ ⋮---- -cumFeeDetail?: Record; // Cumulative trading fee details instead of cumExecFee and feeCurrency +/** Card first-time transaction amount */ ⋮---- -export type WSAccountOrderEventV5 = WSPrivateTopicEventV5< - 'order', - WSAccountOrderV5[] ->; +export interface AffiliateSubAffiliateListItemV5 { + subAffId: string; + userId: string; + name: string; + email: string; + /** Commission per currency (BTC, ETH, MNT, USDC, USDT) for the queried date range */ + commissionsVol: Record; + commissionsForUsdt: string; + becameAffTime: string; + startDate: string; + endDate: string; +} ⋮---- -export interface WSEventOrderV5 { - category: 'event' | string; - orderId: string; - orderLinkId: string; - symbol: string; - symbolId: number; - side: string; - baseCoin: string; - quoteCoin: string; - settleCoin: string; - orderStatus: string; - ecContractType: string; - ecDirection: string; - ecDurationWindow: number; - ecTargetPrice: string; - ecLowerBound: string; - ecUpperBound: string; - ecOrderValue: string; - ecIndexPrice: string; - ecSettleTime: string; - payoutRatio: string; - orderAvgPayoutRatio: string; - cumExecValue: string; - cumExecFee: string; - leavesValue: string; - cumPayout: string; - createType: number; - cancelType: string; - rejectReason: string; - extraFees: unknown[]; - transTime: string; - createdTime: string; - updatedTime: string; +/** Commission per currency (BTC, ETH, MNT, USDC, USDT) for the queried date range */ +⋮---- +export interface AffiliateSubAffiliateListResultV5 { + list: AffiliateSubAffiliateListItemV5[]; + nextPageCursor: string; } ⋮---- -export type WSEventOrderEventV5 = WSPrivateTopicEventV5< - 'order' | 'order.event', - WSEventOrderV5[] ->; +export interface FriendReferralRecordV5 { + id: string; + inviteeUid: string; + status: number; + createdAt: string; + updatedAt: string; +} ⋮---- -export interface WSExecutionV5 { - category: CategoryV5; - symbol: string; - isLeverage: string; - orderId: string; - orderLinkId: string; - side: OrderSideV5; - orderPrice: string; - orderQty: string; - leavesQty: string; - createType: OrderCreateTypeV5; - orderType: OrderTypeV5; - stopOrderType: StopOrderTypeV5; - execFee: string; - feeCurrency: string; // Trading fee currency - execId: string; - execPrice: string; - execQty: string; - execPnl: string; - execType: ExecTypeV5; - execValue: string; - execTime: string; - isMaker: boolean; - feeRate: string; - tradeIv: string; - markIv: string; - markPrice: string; - indexPrice: string; - underlyingPrice: string; - blockTradeId: string; - closedSize: string; - extraFees: string; - seq: number; - marketUnit: string; +export interface ReferralCodeItemV5 { + referralCode: string; + referralLink: string; + scene: number; } ⋮---- -feeCurrency: string; // Trading fee currency +export interface ReferralCodesResultV5 { + referralCodes: ReferralCodeItemV5[]; +} ⋮---- -export type WSExecutionEventV5 = WSPrivateTopicEventV5< - 'execution', - WSExecutionV5[] ->; +/** 0 unknown, 1 awaiting credit, 2 settled. Unrecognized values are returned as 0. */ +export type ReferralCommissionStatusV5 = 0 | 1 | 2; ⋮---- -export interface WSEventExecutionV5 { - category: 'event' | string; - transId: string; - execId: string; - orderId: string; - orderLinkId: string; - symbol: string; - symbolId: number; - baseCoin: string; - quoteCoin: string; - settleCoin: string; - side: string; - feeCoin: string; - execType: string; - execPrice: string; - execValue: string; - execFee: string; - execFeeRate: string; - orderPrice: string; - ecContractType: number | string; - ecDirection: number | string; - ecDurationWindow: number; - ecTargetPrice: string; - ecLowerBound: string; - ecUpperBound: string; - ecOrderValue: string; - ecIndexPrice?: string; - ecPayout: string; - entryPrice: string; - settlePrice: string; - grossPayoutRatio: string; - sessionRpl: string; - transTime: string; - settleTimeMs: string; - crossSeq: string; - timeInForce: string; - extraFees: unknown[]; +export interface ReferralCommissionRecordV5 { + /** Masked invitee ID: first character + `***` + last character. */ + userId: string; + /** Commission payment time, Unix seconds. */ + paymentTime: number; + /** Commission rate. */ + rate: string; + businessUnit: ReferralProductLineV5; + commissionOriginCoin: string; + /** Commission amount in the original currency. */ + commissionOriginAmount: string; + /** Commission value in USDT. */ + commissionUsdtAmount: string; + commissionStatus: ReferralCommissionStatusV5; + /** + * Whether the invitee is a Boost user. May be omitted. + */ + isBoostM2?: boolean; } ⋮---- -export type WSEventExecutionEventV5 = WSPrivateTopicEventV5< - 'execution' | 'execution.event', - WSEventExecutionV5[] ->; +/** Masked invitee ID: first character + `***` + last character. */ ⋮---- -export interface WSExecutionFastV5 { - category: CategoryV5; - symbol: string; - execId: string; - execPrice: string; - execQty: string; - orderId: string; - isMaker: boolean; - orderLinkId: string; - side: OrderSideV5; - execTime: string; - seq: number; - liquidity?: string; +/** Commission payment time, Unix seconds. */ +⋮---- +/** Commission rate. */ +⋮---- +/** Commission amount in the original currency. */ +⋮---- +/** Commission value in USDT. */ +⋮---- +/** + * Whether the invitee is a Boost user. May be omitted. + */ +⋮---- +export interface ReferralCommissionRecordsResultV5 { + records: ReferralCommissionRecordV5[]; + total: number; } ⋮---- -export type WSExecutionFastEventV5 = WSPrivateTopicEventV5< - 'execution.fast', - WSExecutionFastV5[] ->; +export interface ReferralRebateRatioRuleV5 { + /** Referral commission rate, from 0 to 100. */ + rebateRatio: number; + /** Required number of qualified invitees. */ + referralCount: number; + /** Whether the tier requires trading volume. */ + hasTradeCondition: boolean; + /** Trading-volume threshold for the tier. */ + tradeAmountCondition: number; +} ⋮---- -export interface WSCoinV5 { - coin: string; - equity: string; - usdValue: string; - walletBalance: string; - free?: string; - locked: string; - spotHedgingQty: string; - borrowAmount: string; - availableToBorrow: string; - availableToWithdraw: string; - accruedInterest: string; - totalOrderIM: string; - totalPositionIM: string; - totalPositionMM: string; - unrealisedPnl: string; - cumRealisedPnl: string; - bonus: string; - collateralSwitch: boolean; - marginCollateral: boolean; - spotBorrow: string; - colRes?: string; +/** Referral commission rate, from 0 to 100. */ +⋮---- +/** Required number of qualified invitees. */ +⋮---- +/** Whether the tier requires trading volume. */ +⋮---- +/** Trading-volume threshold for the tier. */ +⋮---- +export interface ReferralRebateRuleV5 { + /** Deposit threshold. Currency and precision are not specified. */ + depositAmount: number; + /** Trading threshold. Currency and precision are not specified. */ + tradeAmount: number; + rebateRatioRules: ReferralRebateRatioRuleV5[]; + /** Number of days that the referral commission lasts. */ + rebateDurationDays: number; + /** + * Currently not populated. A default of `0` does not confirm a threshold. + */ + tradefiDepositAmount?: number; + /** + * Currently not populated. A default of `0` does not confirm a threshold. + */ + tradefiTradeAmount?: number; } ⋮---- -export interface WSWalletV5 { - accountType: string; - accountLTV: string; - accountIMRate: string; - accountMMRate: string; - accountIMRateByMp: string; - accountMMRateByMp: string; - totalInitialMarginByMp: string; - totalMaintenanceMarginByMp: string; - totalEquity: string; - totalWalletBalance: string; - totalMarginBalance: string; - totalAvailableBalance: string; - totalPerpUPL: string; - totalInitialMargin: string; - totalMaintenanceMargin: string; - coin: WSCoinV5[]; +/** Deposit threshold. Currency and precision are not specified. */ +⋮---- +/** Trading threshold. Currency and precision are not specified. */ +⋮---- +/** Number of days that the referral commission lasts. */ +⋮---- +/** + * Currently not populated. A default of `0` does not confirm a threshold. + */ +⋮---- +/** + * Currently not populated. A default of `0` does not confirm a threshold. + */ +⋮---- +/** + * Task reward type. See Bybit enum `awardType`. + * `100` loads reward-packet details. Types `95` and `97` do not currently + * include assembled reward details. + */ +export type ReferralAwardTypeV5 = + | 0 + | 1 + | 2 + | 3 + | 4 + | 5 + | 6 + | 7 + | 8 + | 9 + | 10 + | 11 + | 12 + | 13 + | 14 + | 15 + | 16 + | 17 + | 18 + | 19 + | 95 + | 96 + | 97 + | 98 + | 99 + | 100; +⋮---- +export interface ReferralCampaignAwardV5 { + /** Regular reward ID or reward packet ID. */ + id: number; + /** + * English reward name. Reward packets use `UP TO ` or + * `EARN `. + */ + name: string; + /** English reward type. Always `Packet` for reward packets. */ + type: string; + /** English product type. Empty for reward packets. */ + productLine: string; + /** UTC RFC 3339. Empty when unavailable or for reward packets. */ + startTime: string; + /** UTC RFC 3339. Empty when unavailable. */ + endTime: string; } ⋮---- -export type WSWalletEventV5 = WSPrivateTopicEventV5<'wallet', WSWalletV5[]>; +/** Regular reward ID or reward packet ID. */ +⋮---- +/** + * English reward name. Reward packets use `UP TO ` or + * `EARN `. + */ +⋮---- +/** English reward type. Always `Packet` for reward packets. */ +⋮---- +/** English product type. Empty for reward packets. */ ⋮---- -export interface WSGreeksV5 { - baseCoin: string; - totalDelta: string; - totalGamma: string; - totalVega: string; - totalTheta: string; -} +/** UTC RFC 3339. Empty when unavailable or for reward packets. */ ⋮---- -export type WSGreeksEventV5 = WSPrivateTopicEventV5<'greeks', WSGreeksV5[]>; +/** UTC RFC 3339. Empty when unavailable. */ ⋮---- -export interface WSSpreadOrderV5 { - category: 'combination' | 'spot_leg' | 'future_leg'; - symbol: string; - parentOrderId: string; - orderId: string; - orderLinkId: string; - side: OrderSideV5; - orderStatus: OrderStatusV5; - cancelType: OrderCancelTypeV5; - rejectReason: OrderRejectReasonV5; - timeInForce: OrderTimeInForceV5; - price: string; - qty: string; - avgPrice: string; - leavesQty: string; - leavesValue: string; - cumExecQty: string; - cumExecValue: string; - cumExecFee: string; - orderType: OrderTypeV5; - isLeverage: string; - createdTime: string; - updatedTime: string; - feeCurrency: string; - createType: OrderCreateTypeV5; - closedPnl: string; - cumFeeDetail?: Record; // Cumulative trading fee details instead of cumExecFee and feeCurrency +/** One configured task inside a parsed campaign JSON string. */ +export interface ReferralCampaignTaskItemV5 { + id: number; + awardType: ReferralAwardTypeV5; + /** English title of each valid rule. `null` when there are no valid rules. */ + ruleTitle: string[] | null; + /** English description of each valid rule. Same index as `ruleTitle`. */ + ruleDescription: string[] | null; + /** First parameter of each valid rule. Same index as `ruleTitle`. */ + ruleParam: string[] | null; + taskAwards: ReferralCampaignAwardV5[]; + /** M1 rewards with `UserRelateType=REFERRAL`. */ + m1Awards: ReferralCampaignAwardV5[]; } ⋮---- -cumFeeDetail?: Record; // Cumulative trading fee details instead of cumExecFee and feeCurrency +/** English title of each valid rule. `null` when there are no valid rules. */ ⋮---- -export type WSSpreadOrderEventV5 = WSPrivateTopicEventV5< - 'spread.order', - WSSpreadOrderV5[] ->; +/** English description of each valid rule. Same index as `ruleTitle`. */ ⋮---- -export interface WSSpreadExecutionV5 { - category: 'combination' | 'spot_leg' | 'future_leg'; - symbol: string; - isLeverage: string; - orderId: string; - orderLinkId: string; - side: OrderSideV5; - orderPrice: string; - orderQty: string; - leavesQty: string; - createType: OrderCreateTypeV5; - orderType: OrderTypeV5; - execFee: string; - execFeeV2: string; - feeCurrency: string; // Trading fee currency - parentExecId: string; - execId: string; - execPrice: string; - execQty: string; - execPnl: string; - execType: ExecTypeV5; - execValue: string; - execTime: string; - isMaker: boolean; - feeRate: string; - markPrice: string; - closedSize: string; - seq: number; +/** First parameter of each valid rule. Same index as `ruleTitle`. */ +⋮---- +/** M1 rewards with `UserRelateType=REFERRAL`. */ +⋮---- +/** + * Parsed shape of one `ReferralCampaignRewardsResultV5.tasks` string. + * `schemaVersion` is `2`. This is campaign configuration, not the user's + * task progress or a claimed reward. + */ +export interface ReferralCampaignTaskPayloadV5 { + schemaVersion: 2; + source: 'base' | 'fiat' | 'earn'; + /** Campaign configuration ID, not a user reward-record ID. */ + campaignId: string; + /** May be empty if task details cannot be assembled. */ + tasks: ReferralCampaignTaskItemV5[]; } ⋮---- -feeCurrency: string; // Trading fee currency +/** Campaign configuration ID, not a user reward-record ID. */ ⋮---- -export type WSSpreadExecutionEventV5 = WSPrivateTopicEventV5< - 'spread.execution', - WSSpreadExecutionV5[] ->; +/** May be empty if task details cannot be assembled. */ ⋮---- -export interface WSInsuranceV5 { - coin: string; - symbols: string; - balance: string; - updateTime: string; +export interface ReferralCampaignRewardsResultV5 { + /** + * Site referral rules. This does not indicate the tier matched by the + * current user. + */ + rebateRule: ReferralRebateRuleV5; + /** + * Campaign JSON strings, in base, fiat, then earn order when active. + * Parse each string as `ReferralCampaignTaskPayloadV5`. + */ + tasks: string[]; } ⋮---- -export type WSInsuranceEventV5 = WSPublicTopicEventV5< - 'insurance.USDT' | 'insurance.USDC' | 'insurance.inverse', - 'snapshot' | 'delta', - WSInsuranceV5[] ->; +/** + * Site referral rules. This does not indicate the tier matched by the + * current user. + */ ⋮---- -export interface WSPriceLimitV5 { - symbol: string; - buyLmt: string; - sellLmt: string; +/** + * Campaign JSON strings, in base, fiat, then earn order when active. + * Parse each string as `ReferralCampaignTaskPayloadV5`. + */ +⋮---- +export interface ReferralCommissionInfoV5 { + totalCommission: string; + yesterdayCommission: string; + totalFriends: number; + /** Number of invitees eligible for commission. */ + qualifiedFriends: number; + walletBalance: string; + /** Current-quarter trading volume of qualified invitees. */ + qualifiedFriendsQuarterTotalTradeVolume: string; + /** + * Active invitees in the current quarter. May be `0` when the source + * value is `0`. + */ + curQuarterActiveFriendsCount: number; + /** Legacy referral-commission programme indicator. */ + hasOldReferral: number; + /** + * 0 unknown or not downgraded, 1 downgraded due to active invitee count, + * 2 downgraded due to invitee trading volume. + */ + degradeType: 0 | 1 | 2; + commissionRate: string; + /** 0 unknown, 1 upgraded, 2 upgrading, 3 not upgraded. */ + upgradeUnifiedAccount: 0 | 1 | 2 | 3; + /** + * 1 enabled, 2 disabled. May be `0` when the source value is `0`. + */ + withdrawalSwitch: 0 | 1 | 2; + /** + * Qualified invitees in the previous quarter. May be `0` when the source + * value is `0`. + */ + lastQuarterQualifiedFriendsCount: number; } ⋮---- -export type WSPriceLimitEventV5 = WSPublicTopicEventV5< - string, - 'snapshot', - WSPriceLimitV5 ->; +/** Number of invitees eligible for commission. */ ⋮---- -export interface WSADLAlertV5 { - c: string; // Token of the insurance pool - s: string; // Trading pair name - b: string; // Balance of the insurance fund. For shared insurance pool, follows T+1 refresh (updated daily at 00:00 UTC) - mb: string; // Deprecated: always returns empty string. Previously: Maximum balance of the insurance pool in the last 8 hours - i_pr: string; // PnL ratio threshold for triggering contract PnL drawdown ADL - pr: string; // Symbol's PnL drawdown ratio in the last 8 hours. Used to determine whether ADL is triggered or stopped - adl_tt: string; // Trigger threshold for contract PnL drawdown ADL - adl_sr: string; // Stop ratio threshold for contract PnL drawdown ADL +/** Current-quarter trading volume of qualified invitees. */ +⋮---- +/** + * Active invitees in the current quarter. May be `0` when the source + * value is `0`. + */ +⋮---- +/** Legacy referral-commission programme indicator. */ +⋮---- +/** + * 0 unknown or not downgraded, 1 downgraded due to active invitee count, + * 2 downgraded due to invitee trading volume. + */ +⋮---- +/** 0 unknown, 1 upgraded, 2 upgrading, 3 not upgraded. */ +⋮---- +/** + * 1 enabled, 2 disabled. May be `0` when the source value is `0`. + */ +⋮---- +/** + * Qualified invitees in the previous quarter. May be `0` when the source + * value is `0`. + */ +⋮---- +export interface ReferralUserIdentityProfileV5 { + isAffiliate: boolean; + /** + * Whether the current user is an M1 inviter. Checked only when the user + * is not an affiliate. + */ + isM1: boolean; + /** + * Affiliate ID from the affiliate direct-customer relationship. `0` if + * none is found. + */ + inviterAffiliateId: number; + /** + * Relationship indicator: `1` when an affiliate direct-customer record + * exists, otherwise `0`. This is not the affiliate user's ID. + */ + inviterAffiliateUserId: number; + /** + * Relationship indicator: `1` when an invitation record exists for the + * current user as invitee, otherwise `0`. This is not the inviter's ID. + */ + inviterUserId: number; + /** + * Present only when an M1 inviter record matches the authenticated user + * and the commission query succeeds. + */ + commissionInfo?: ReferralCommissionInfoV5; } ⋮---- -c: string; // Token of the insurance pool -s: string; // Trading pair name -b: string; // Balance of the insurance fund. For shared insurance pool, follows T+1 refresh (updated daily at 00:00 UTC) -mb: string; // Deprecated: always returns empty string. Previously: Maximum balance of the insurance pool in the last 8 hours -i_pr: string; // PnL ratio threshold for triggering contract PnL drawdown ADL -pr: string; // Symbol's PnL drawdown ratio in the last 8 hours. Used to determine whether ADL is triggered or stopped -adl_tt: string; // Trigger threshold for contract PnL drawdown ADL -adl_sr: string; // Stop ratio threshold for contract PnL drawdown ADL +/** + * Whether the current user is an M1 inviter. Checked only when the user + * is not an affiliate. + */ ⋮---- -export type WSADLAlertEventV5 = WSPublicTopicEventV5< - 'adlAlert.USDT' | 'adlAlert.USDC' | 'adlAlert.inverse', - 'snapshot', - WSADLAlertV5[] ->; +/** + * Affiliate ID from the affiliate direct-customer relationship. `0` if + * none is found. + */ ⋮---- -export type WSSystemStatusEventV5 = WSPublicTopicEventV5< - 'system.status', - 'snapshot', - SystemStatusItemV5[] ->; +/** + * Relationship indicator: `1` when an affiliate direct-customer record + * exists, otherwise `0`. This is not the affiliate user's ID. + */ ⋮---- /** - * RFQ WebSocket Events - */ + * Relationship indicator: `1` when an invitation record exists for the + * current user as invitee, otherwise `0`. This is not the inviter's ID. + */ ⋮---- /** - * RFQ Inquiry Channel - * Private push for RFQ inquiries sent or received by the user - * Topics: rfq.open.rfqs, rfq.site.rfqs - */ -export type WSRFQInquiryEventV5 = WSPrivateTopicEventV5< - 'rfq.open.rfqs' | 'rfq.site.rfqs', - RFQItemV5[] ->; + * Present only when an M1 inviter record matches the authenticated user + * and the commission query succeeds. + */ +⋮---- +export interface ReferralUserInvitationRecordV5 { + /** Masked invitee ID. */ + userIdMask: string; + /** Invitee registration timestamp. */ + signTime: number; + userStatus: ReferralFriendStatusV5; + /** Total commission, at most eight decimal places. */ + totalCommission: string; + /** + * Unencrypted decimal invitee user ID. `userIdMask` is separate. The docs + * say to confirm that exposing this value is intended. + */ + userId: string; + taskProgress: string; + /** + * `true` for some new EU-site invitees and non-Boost JPN-site invitees. + * The Boost path leaves the default `false`. + */ + notShowCommission: boolean; + /** + * Not populated by the current endpoint. May be omitted, or `""`. + */ + totalBaseRewards?: string; +} +⋮---- +/** Masked invitee ID. */ +⋮---- +/** Invitee registration timestamp. */ +⋮---- +/** Total commission, at most eight decimal places. */ ⋮---- /** - * RFQ Quote Channel - * Private push for quotes sent or received by the user - * Topics: rfq.open.quotes, rfq.site.quotes - */ -export type WSRFQQuoteEventV5 = WSPrivateTopicEventV5< - 'rfq.open.quotes' | 'rfq.site.quotes', - RFQQuoteItemV5[] ->; + * Unencrypted decimal invitee user ID. `userIdMask` is separate. The docs + * say to confirm that exposing this value is intended. + */ ⋮---- /** - * RFQ Trade Channel - * Private push for block trades executed by the user - * Topics: rfq.open.trades, rfq.site.trades - */ -export type WSRFQTradeEventV5 = WSPrivateTopicEventV5< - 'rfq.open.trades' | 'rfq.site.trades', - RFQTradeV5[] ->; + * `true` for some new EU-site invitees and non-Boost JPN-site invitees. + * The Boost path leaves the default `false`. + */ ⋮---- /** - * RFQ Public Trade Channel - * Public push for all block trades - * Topics: rfq.open.public.trades, rfq.site.public.trades - */ -export type WSRFQPublicTradeEventV5 = WSPublicTopicEventV5< - 'rfq.open.public.trades' | 'rfq.site.public.trades', - 'snapshot', - RFQPublicTradeV5[] ->; - -================ -File: src/types/request/index.ts -================ - + * Not populated by the current endpoint. May be omitted, or `""`. + */ +⋮---- +export interface ReferralUserInvitationsResultV5 { + records: ReferralUserInvitationRecordV5[]; + total: number; +} ================ -File: src/types/request/v5-market.ts +File: src/types/websockets/ws-events.ts ================ -import { KlineIntervalV3 } from '../shared'; +import WebSocket from 'isomorphic-ws'; +⋮---- +import { + RFQItemV5, + RFQPublicTradeV5, + RFQQuoteItemV5, + RFQTradeV5, +} from '../response/v5-rfq'; import { CategoryV5, - InstrumentStatusV5, - InstrumentSymbolTypeV5, - OptionTypeV5, + ExecTypeV5, + OCOTriggerTypeV5, + OrderCancelTypeV5, + OrderCreateTypeV5, + OrderRejectReasonV5, + OrderSideV5, + OrderSMPTypeV5, + OrderStatusV5, + OrderTimeInForceV5, + OrderTriggerByV5, + OrderTypeV5, + PositionIdx, + PositionSideV5, + PositionStatusV5, + StopOrderTypeV5, + SystemStatusItemV5, + TPSLModeV5, + TradeModeV5, } from '../shared-v5'; +import { WsKey } from './ws-general'; ⋮---- -export interface GetKlineParamsV5 { - category: 'spot' | 'linear' | 'inverse'; - symbol: string; - interval: KlineIntervalV3; - start?: number; - end?: number; - limit?: number; +export interface MessageEventLike { + target: WebSocket; + type: 'message'; + data: string; } ⋮---- -export interface GetMarkPriceKlineParamsV5 { +export function isMessageEvent(msg: unknown): msg is MessageEventLike +⋮---- +export interface WSPublicTopicEventV5 { + id?: string; + topic: TTopic; + type: TType; + /** Cross sequence */ + cs?: number; + /** Event timestamp */ + ts: number; + data: TData; /** - * linear (default if omitted), inverse, or option. + * matching engine timestamp (correlated with T from public trade channel) */ - category?: 'linear' | 'inverse' | 'option'; - symbol: string; - interval: KlineIntervalV3; - start?: number; - end?: number; + cts: number; /** - * Futures: [1, 1000], default 200. Options: [1, 500], default 200. + * Internal reference, can be used to determine if this is spot/linear/inverse/etc */ - limit?: number; + wsKey: WsKey; } ⋮---- +/** Cross sequence */ +⋮---- +/** Event timestamp */ +⋮---- /** - * linear (default if omitted), inverse, or option. + * matching engine timestamp (correlated with T from public trade channel) */ ⋮---- /** - * Futures: [1, 1000], default 200. Options: [1, 500], default 200. + * Internal reference, can be used to determine if this is spot/linear/inverse/etc */ ⋮---- -export interface GetIndexPriceKlineParamsV5 { - category: 'linear' | 'inverse'; - symbol: string; - interval: KlineIntervalV3; - start?: number; - end?: number; - limit?: number; -} -⋮---- -export interface GetPremiumIndexPriceKlineParamsV5 { - category: 'linear'; - symbol: string; - interval: KlineIntervalV3; - start?: number; - end?: number; - limit?: number; +export interface WSPrivateTopicEventV5 { + id?: string; + topic: TTopic; + creationTime: number; + data: TData; + wsKey: WsKey; } ⋮---- -export interface GetInstrumentsInfoParamsV5 { - category: CategoryV5; - symbol?: string; - /** Filter by instrument `symbolType` (e.g. `commodity`, `stock`, `forex` for linear). */ - symbolType?: InstrumentSymbolTypeV5; - status?: InstrumentStatusV5; - /** For `category=option`, pass `All` to return all option symbols. */ - baseCoin?: string; - limit?: number; - cursor?: string; +export interface WSOrderbookV5 { + /** Symbol */ + s: string; + /** [price, qty][] */ + b: [string, string][]; + /** [price, qty][] */ + a: [string, string][]; + /** Update ID */ + u: number; + /** Cross sequence */ + seq: number; } ⋮---- -/** Filter by instrument `symbolType` (e.g. `commodity`, `stock`, `forex` for linear). */ -⋮---- -/** For `category=option`, pass `All` to return all option symbols. */ +/** Symbol */ ⋮---- -/** - * GET /v5/market/instrument-summary - * - * `category` is required. Page with `cursor` = previous `nextPageCursor`. - */ -export interface GetInstrumentSummaryParamsV5 { - /** Product type. `linear` or `option`. */ - category: 'linear' | 'option'; - symbol?: string; - /** Instrument type. */ - symbolType?: string; - /** Market region, for example `HK`, `US`, `CN`, `KR`. */ - marketRegion?: string; - /** Base coin, for example `NVDA` or `TSLA`. */ - baseCoin?: string; - /** Page size. Range [1, 1000]. Default 500. */ - limit?: number; - /** Cursor. Use `nextPageCursor` from the previous response. */ - cursor?: string; -} +/** [price, qty][] */ ⋮---- -/** Product type. `linear` or `option`. */ +/** [price, qty][] */ ⋮---- -/** Instrument type. */ +/** Update ID */ ⋮---- -/** Market region, for example `HK`, `US`, `CN`, `KR`. */ +/** Cross sequence */ ⋮---- -/** Base coin, for example `NVDA` or `TSLA`. */ +export type WSOrderbookEventV5 = WSPublicTopicEventV5< + string, + 'delta' | 'snapshot', + WSOrderbookV5 +>; ⋮---- -/** Page size. Range [1, 1000]. Default 500. */ +export interface WSTradeV5 { + T: number; + s: string; + S: OrderSideV5; + v: string; + p: string; + L?: string; + i: string; + BT: boolean; + RPI?: boolean; + mP?: string; + iP?: string; + mIv?: string; + iv?: string; +} ⋮---- -/** Cursor. Use `nextPageCursor` from the previous response. */ +export type WSTradeEventV5 = WSPublicTopicEventV5< + string, + 'snapshot', + WSTradeV5[] +>; ⋮---- -export interface GetOrderbookParamsV5 { - category: CategoryV5; - symbol: string; - limit?: number; +export interface WSEventOrderbookV5 { + s: string; + r: [string, string][]; + u: number; + seq: number; } ⋮---- -export interface GetRPIOrderbookParamsV5 { - category?: 'spot' | 'linear' | 'inverse'; - symbol: string; - limit: number; // Required for RPI orderbook, [1, 50] +export type WSEventOrderbookEventV5 = WSPublicTopicEventV5< + string, + 'delta' | 'snapshot', + WSEventOrderbookV5 +>; +⋮---- +export interface WSEventPublicTradeV5 { + T: number; + s: string; + r: string; + a: string; + i: string; + seq: number; } ⋮---- -limit: number; // Required for RPI orderbook, [1, 50] +export type WSEventPublicTradeEventV5 = WSPublicTopicEventV5< + string, + 'snapshot', + WSEventPublicTradeV5[] +>; ⋮---- -export interface GetIndexPriceComponentsParamsV5 { - indexName: string; // Index name, like BTCUSDT +/** + * WSTickerV5 is the data structure for the "linear" ticker channel + * */ +export interface WSTickerV5 { + symbol: string; + tickDirection: string; + price24hPcnt: string; + lastPrice: string; + prevPrice24h: string; + highPrice24h: string; + lowPrice24h: string; + prevPrice1h: string; + markPrice: string; + indexPrice: string; + openInterest: string; + openInterestValue: string; + singleOpenInterest?: string; + singleOpenInterestValue?: string; + turnover24h: string; + volume24h: string; + nextFundingTime: string; + fundingRate: string; + bid1Price: string; + bid1Size: string; + ask1Price: string; + ask1Size: string; + deliveryTime?: string; + basisRate?: string; + deliveryFeeRate?: string; + predictedDeliveryPrice?: string; + preOpenPrice?: string; + preQty?: string; + curPreListingPhase?: string; + fundingIntervalHour?: string; + fundingCap?: string; + basisRateYear?: string; } ⋮---- -indexName: string; // Index name, like BTCUSDT -⋮---- -export interface GetADLAlertParamsV5 { - symbol?: string; // Contract name, e.g. BTCUSDT. Uppercase only +export interface WSTickerOptionV5 { + symbol: string; + bidPrice: string; + bidSize: string; + bidIv: string; + askPrice: string; + askSize: string; + askIv: string; + lastPrice: string; + highPrice24h: string; + lowPrice24h: string; + markPrice: string; + indexPrice: string; + markPriceIv: string; + underlyingPrice: string; + openInterest: string; + turnover24h: string; + volume24h: string; + totalVolume: string; + totalTurnover: string; + delta: string; + gamma: string; + vega: string; + theta: string; + predictedDeliveryPrice: string; + change24h: string; } ⋮---- -symbol?: string; // Contract name, e.g. BTCUSDT. Uppercase only -⋮---- -export interface GetFeeGroupStructureParamsV5 { - productType: string; // Product type. contract only for now - groupId?: string; // Group ID. 1, 2, 3, 4, 5, 6, 7 +export interface WSTickerSpotV5 { + symbol: string; + lastPrice: string; + highPrice24h: string; + lowPrice24h: string; + prevPrice24h: string; + volume24h: string; + turnover24h: string; + price24hPcnt: string; + usdIndexPrice: string; } ⋮---- -productType: string; // Product type. contract only for now -groupId?: string; // Group ID. 1, 2, 3, 4, 5, 6, 7 +export type WSTickerEventV5 = WSPublicTopicEventV5< + string, + 'snapshot' | 'delta', + WSTickerV5 | WSTickerOptionV5 | WSTickerSpotV5 +>; ⋮---- -export interface GetTickersParamsV5 { - category: TCategory; - symbol?: string; - baseCoin?: string; - expDate?: string; +export interface WSKlineV5 { + start: number; + end: number; + interval: string; + open: string; + close: string; + high: string; + low: string; + volume: string; + turnover: string; + confirm: boolean; + timestamp: number; } ⋮---- -export interface GetFundingRateHistoryParamsV5 { - category: 'linear' | 'inverse'; - symbol: string; - startTime?: number; - endTime?: number; - limit?: number; -} +export type WSKlineEventV5 = WSPublicTopicEventV5< + string, + 'snapshot', + WSKlineV5[] +>; ⋮---- -export interface GetPublicTradingHistoryParamsV5 { - category: CategoryV5; - symbol: string; - baseCoin?: string; - optionType?: OptionTypeV5; - limit?: number; +export interface WSLiquidationV5 { + T: number; + s: string; + S: OrderSideV5; + v: string; + p: string; } ⋮---- -export type OpenInterestIntervalV5 = - | '5min' - | '15min' - | '30min' - | '1h' - | '4h' - | '1d'; +export type WSLiquidationEventV5 = WSPublicTopicEventV5< + string, + 'snapshot', + WSLiquidationV5[] +>; ⋮---- -export interface GetOpenInterestParamsV5 { - category: 'linear' | 'inverse'; +export interface WSPositionV5 { + category: string; symbol: string; - intervalTime: OpenInterestIntervalV5; - startTime?: number; - endTime?: number; - limit?: number; - cursor?: string; -} -⋮---- -export interface GetHistoricalVolatilityParamsV5 { - category: 'option'; - baseCoin?: string; - period?: 7 | 14 | 21 | 30 | 60 | 90 | 180 | 270; - startTime?: number; - endTime?: number; -} -⋮---- -export interface GetInsuranceParamsV5 { - coin?: string; -} -⋮---- -export interface GetRiskLimitParamsV5 { - category?: 'linear' | 'inverse'; - symbol?: string; - cursor?: string; + side: PositionSideV5; + size: string; + positionIdx: PositionIdx; + tradeMode: TradeModeV5; + positionValue: string; + riskId: number; + riskLimitValue: string; + entryPrice: string; + markPrice: string; + leverage: string; + breakEvenPrice?: string; // Break even price, only for linear & inverse + positionBalance: string; + autoAddMargin: number; + positionMM: string; + positionIM: string; + positionIMByMp: string; + positionMMByMp: string; + liqPrice: string; + bustPrice: string; + tpslMode: string; + takeProfit: string; + stopLoss: string; + trailingStop: string; + unrealisedPnl: string; + curRealisedPnl: string; + sessionAvgPrice: string; + delta: string; + gamma: string; + vega: string; + theta: string; + cumRealisedPnl: string; + positionStatus: PositionStatusV5; + adlRankIndicator: number; + isReduceOnly: boolean; + mmrSysUpdatedTime: string; + leverageSysUpdatedTime: string; + createdTime: string; + updatedTime: string; + /** Position open timestamp (ms). Default `0` when not set. */ + openTime: number; + seq: number; + netDeltaRatio?: string; } ⋮---- -export interface GetOptionDeliveryPriceParamsV5 { - category: 'option'; - symbol?: string; - baseCoin?: string; - limit?: number; - cursor?: string; -} +breakEvenPrice?: string; // Break even price, only for linear & inverse ⋮---- -export interface GetDeliveryPriceParamsV5 { - category: 'linear' | 'inverse' | 'option'; - symbol?: string; - baseCoin?: string; - settleCoin?: string; - limit?: number; - cursor?: string; -} +/** Position open timestamp (ms). Default `0` when not set. */ ⋮---- -export interface GetLongShortRatioParamsV5 { - category: 'linear' | 'inverse'; - symbol: string; - period: OpenInterestIntervalV5; - startTime?: string; - endTime?: string; - limit?: number; - cursor?: string; -} +export type WSPositionEventV5 = WSPrivateTopicEventV5< + 'position', + WSPositionV5[] +>; ⋮---- -export interface GetFullDepthOrderbookParamsV5 { - category: 'spot' | 'linear' | 'inverse'; +export interface WSEventPositionV5 { symbol: string; + baseCoin: string; + settleCoin: string; + side: string; + ecContractType: string; + ecDirection: string; + avgPayoutRatio: string; + positionValue: string; + ecSettleTime: string; + cumClosedPnl: string; + createdTime: string; + updatedTime: string; + seq: number; } ⋮---- -export interface GetOptionBaseCoinsParamsV5 { - /** - * Comma-separated underlying types. - * 0 crypto, 1 commodity, 2 stock, 3 forex, 4 oil. Omit to return all types. - */ - underlyingType?: string; -} -⋮---- -/** - * Comma-separated underlying types. - * 0 crypto, 1 commodity, 2 stock, 3 forex, 4 oil. Omit to return all types. - */ - -================ -File: src/types/response/index.ts -================ - - -================ -File: src/types/response/v5-asset.ts -================ -import { AccountTypeV5, OrderSideV5, WithdrawalTypeV5 } from '../shared-v5'; +export type WSEventPositionEventV5 = WSPrivateTopicEventV5< + 'position.event', + WSEventPositionV5[] +>; ⋮---- -export interface CoinExchangeRecordV5 { - fromCoin: string; - fromAmount: string; - toCoin: string; - toAmount: string; - exchangeRate: string; +export interface WSAccountOrderV5 { + category: CategoryV5; + orderId: string; + orderLinkId: string; + parentOrderLinkId?: string; // Linked parent order for attached TP/SL orders (futures & options) + isLeverage: string; + blockTradeId: string; + symbol: string; + price: string; + qty: string; + side: OrderSideV5; + positionIdx: PositionIdx; + orderStatus: OrderStatusV5; + createType: OrderCreateTypeV5; + cancelType: OrderCancelTypeV5; + rejectReason?: OrderRejectReasonV5; + avgPrice?: string; + leavesQty?: string; + leavesValue?: string; + cumExecQty: string; + cumExecValue: string; + cumExecFee: string; + closedPnl: string; + feeCurrency: string; + timeInForce: OrderTimeInForceV5; + orderType: OrderTypeV5; + stopOrderType: StopOrderTypeV5; + ocoTriggerType?: OCOTriggerTypeV5; + orderIv: string; + marketUnit?: 'baseCoin' | 'quoteCoin'; + triggerPrice: string; + takeProfit: string; + stopLoss: string; + tpslMode?: TPSLModeV5; + tpLimitPrice?: string; + slLimitPrice?: string; + tpTriggerBy: string; + slTriggerBy: string; + triggerDirection: number; + triggerBy: OrderTriggerByV5; + lastPriceOnCreated: string; + reduceOnly: boolean; + closeOnTrigger: boolean; + placeType: string; + smpType: OrderSMPTypeV5; + smpGroup: string; + smpOrderId: string; createdTime: string; - exchangeTxId: string; + updatedTime: string; + cumFeeDetail?: Record; // Cumulative trading fee details instead of cumExecFee and feeCurrency + rpiTakerAccess?: boolean; + rpiMatchedQty?: string; } ⋮---- -export interface DeliveryRecordV5 { - deliveryTime: number; - symbol: string; - side: OrderSideV5; - position: string; - deliveryPrice: string; - strike: string; - fee: string; - deliveryRpl: string; - entryPrice: string; -} +parentOrderLinkId?: string; // Linked parent order for attached TP/SL orders (futures & options) ⋮---- -export interface SettlementRecordV5 { +cumFeeDetail?: Record; // Cumulative trading fee details instead of cumExecFee and feeCurrency +⋮---- +export type WSAccountOrderEventV5 = WSPrivateTopicEventV5< + 'order', + WSAccountOrderV5[] +>; +⋮---- +export interface WSEventOrderV5 { + category: 'event' | string; + orderId: string; + orderLinkId: string; symbol: string; + symbolId: number; side: string; - size: number; - sessionAvgPrice: string; - markPrice: string; - realisedPnl: string; + baseCoin: string; + quoteCoin: string; + settleCoin: string; + orderStatus: string; + ecContractType: string; + ecDirection: string; + ecDurationWindow: number; + ecTargetPrice: string; + ecLowerBound: string; + ecUpperBound: string; + ecOrderValue: string; + ecIndexPrice: string; + ecSettleTime: string; + payoutRatio: string; + orderAvgPayoutRatio: string; + cumExecValue: string; + cumExecFee: string; + leavesValue: string; + cumPayout: string; + createType: number; + cancelType: string; + rejectReason: string; + extraFees: unknown[]; + transTime: string; createdTime: string; + updatedTime: string; } ⋮---- -export interface AssetInfoAssetV5 { - coin: string; - frozen: string; - free: string; - withdraw: string; -} +export type WSEventOrderEventV5 = WSPrivateTopicEventV5< + 'order' | 'order.event', + WSEventOrderV5[] +>; ⋮---- -export interface AssetInfoV5 { - status: 'ACCOUNT_STATUS_NORMAL' | 'ACCOUNT_STATUS_UNSPECIFIED'; - assets: AssetInfoAssetV5[]; +export interface WSExecutionV5 { + category: CategoryV5; + symbol: string; + isLeverage: string; + orderId: string; + orderLinkId: string; + side: OrderSideV5; + orderPrice: string; + orderQty: string; + leavesQty: string; + createType: OrderCreateTypeV5; + orderType: OrderTypeV5; + stopOrderType: StopOrderTypeV5; + execFee: string; + feeCurrency: string; // Trading fee currency + execId: string; + execPrice: string; + execQty: string; + execPnl: string; + execType: ExecTypeV5; + execValue: string; + execTime: string; + isMaker: boolean; + feeRate: string; + tradeIv: string; + markIv: string; + markPrice: string; + indexPrice: string; + underlyingPrice: string; + blockTradeId: string; + closedSize: string; + extraFees: string; + seq: number; + marketUnit: string; } ⋮---- -export interface CoinBalanceV5 { - coin: string; - walletBalance: string; - transferBalance: string; - bonus?: string; -} +feeCurrency: string; // Trading fee currency ⋮---- -export interface AllCoinsBalanceV5 { - accountType: AccountTypeV5; - memberId?: string; - balance: CoinBalanceV5[]; +export type WSExecutionEventV5 = WSPrivateTopicEventV5< + 'execution', + WSExecutionV5[] +>; +⋮---- +export interface WSEventExecutionV5 { + category: 'event' | string; + transId: string; + execId: string; + orderId: string; + orderLinkId: string; + symbol: string; + symbolId: number; + baseCoin: string; + quoteCoin: string; + settleCoin: string; + side: string; + feeCoin: string; + execType: string; + execPrice: string; + execValue: string; + execFee: string; + execFeeRate: string; + orderPrice: string; + ecContractType: number | string; + ecDirection: number | string; + ecDurationWindow: number; + ecTargetPrice: string; + ecLowerBound: string; + ecUpperBound: string; + ecOrderValue: string; + ecIndexPrice?: string; + ecPayout: string; + entryPrice: string; + settlePrice: string; + grossPayoutRatio: string; + sessionRpl: string; + transTime: string; + settleTimeMs: string; + crossSeq: string; + timeInForce: string; + extraFees: unknown[]; } ⋮---- -export interface AccountCoinBalanceV5 { - accountType: AccountTypeV5; - bizType: number; - accountId: string; - memberId: string; - balance: { - coin: string; - walletBalance: string; - transferBalance: string; - bonus: string; - transferSafeAmount: string; - ltvTransferSafeAmount: string; - }; +export type WSEventExecutionEventV5 = WSPrivateTopicEventV5< + 'execution' | 'execution.event', + WSEventExecutionV5[] +>; +⋮---- +export interface WSExecutionFastV5 { + category: CategoryV5; + symbol: string; + execId: string; + execPrice: string; + execQty: string; + orderId: string; + isMaker: boolean; + orderLinkId: string; + side: OrderSideV5; + execTime: string; + seq: number; + liquidity?: string; } ⋮---- -export interface InternalTransferRecordV5 { - transferId: string; +export type WSExecutionFastEventV5 = WSPrivateTopicEventV5< + 'execution.fast', + WSExecutionFastV5[] +>; +⋮---- +export interface WSCoinV5 { coin: string; - amount: string; - fromAccountType: AccountTypeV5; - toAccountType: AccountTypeV5; - timestamp: string; - status: string; + equity: string; + usdValue: string; + walletBalance: string; + free?: string; + locked: string; + spotHedgingQty: string; + borrowAmount: string; + availableToBorrow: string; + availableToWithdraw: string; + accruedInterest: string; + totalOrderIM: string; + totalPositionIM: string; + totalPositionMM: string; + unrealisedPnl: string; + cumRealisedPnl: string; + bonus: string; + collateralSwitch: boolean; + marginCollateral: boolean; + spotBorrow: string; + colRes?: string; } ⋮---- -export interface UniversalTransferRecordV5 { - transferId: string; - coin: string; - amount: string; - fromMemberId: string; - toMemberId: string; - fromAccountType: AccountTypeV5; - toAccountType: AccountTypeV5; - timestamp: string; - status: string; - withdrawReqId?: string; - depositReqId?: string; +export interface WSWalletV5 { + accountType: string; + accountLTV: string; + accountIMRate: string; + accountMMRate: string; + accountIMRateByMp: string; + accountMMRateByMp: string; + totalInitialMarginByMp: string; + totalMaintenanceMarginByMp: string; + totalEquity: string; + totalWalletBalance: string; + totalMarginBalance: string; + totalAvailableBalance: string; + totalPerpUPL: string; + totalInitialMargin: string; + totalMaintenanceMargin: string; + coin: WSCoinV5[]; } ⋮---- -export interface AllowedDepositCoinInfoV5 { - coin: string; - chain: string; - coinShowName: string; - chainType: string; - blockConfirmNumber: number; - minDepositAmount: string; -} +export type WSWalletEventV5 = WSPrivateTopicEventV5<'wallet', WSWalletV5[]>; ⋮---- -export interface DepositRecordV5 { - id: string; - coin: string; - chain: string; - amount: string; - txID: string; - status: number; - toAddress: string; - tag: string; - depositFee: string; - successAt: string; - confirmations: string; - txIndex: string; - blockHash: string; - batchReleaseLimit: string; - depositType: string; - fromAddress: string; - travelRuleStatus?: string; +export interface WSGreeksV5 { + baseCoin: string; + totalDelta: string; + totalGamma: string; + totalVega: string; + totalTheta: string; } ⋮---- -export interface SubmitDepositOriginatorInfoResultV5 { - travelRuleStatus: number; -} +export type WSGreeksEventV5 = WSPrivateTopicEventV5<'greeks', WSGreeksV5[]>; ⋮---- -export interface InternalDepositRecordV5 { - id: string; - type: 1; - coin: string; - amount: string; - status: 1 | 2 | 3; - address: string; +export interface WSSpreadOrderV5 { + category: 'combination' | 'spot_leg' | 'future_leg'; + symbol: string; + parentOrderId: string; + orderId: string; + orderLinkId: string; + side: OrderSideV5; + orderStatus: OrderStatusV5; + cancelType: OrderCancelTypeV5; + rejectReason: OrderRejectReasonV5; + timeInForce: OrderTimeInForceV5; + price: string; + qty: string; + avgPrice: string; + leavesQty: string; + leavesValue: string; + cumExecQty: string; + cumExecValue: string; + cumExecFee: string; + orderType: OrderTypeV5; + isLeverage: string; createdTime: string; - txID: string; - complianceStatus?: string; + updatedTime: string; + feeCurrency: string; + createType: OrderCreateTypeV5; + closedPnl: string; + cumFeeDetail?: Record; // Cumulative trading fee details instead of cumExecFee and feeCurrency } ⋮---- -export interface DepositAddressChainV5 { - chainType: string; - addressDeposit: string; - tagDeposit: string; - chain: string; - batchReleaseLimit: string; - contractAddress: string; -} +cumFeeDetail?: Record; // Cumulative trading fee details instead of cumExecFee and feeCurrency ⋮---- -export interface DepositAddressResultV5 { - coin: string; - chains: DepositAddressChainV5[]; -} +export type WSSpreadOrderEventV5 = WSPrivateTopicEventV5< + 'spread.order', + WSSpreadOrderV5[] +>; ⋮---- -export interface CoinInfoV5 { - name: string; - coin: string; - /** @deprecated Use `chains[].withdrawMax` instead */ - remainAmount: string; - chains: { - chain: string; - chainType: string; - confirmation: string; - withdrawFee: string; - depositMin: string; - withdrawMin: string; - minAccuracy: string; - chainDeposit: string; - chainWithdraw: string; - withdrawPercentageFee: string; - contractAddress: string; - safeConfirmNumber: string; - /** Max withdraw amount per transaction per chain. `-1` means no limit */ - withdrawMax: string; - }[]; +export interface WSSpreadExecutionV5 { + category: 'combination' | 'spot_leg' | 'future_leg'; + symbol: string; + isLeverage: string; + orderId: string; + orderLinkId: string; + side: OrderSideV5; + orderPrice: string; + orderQty: string; + leavesQty: string; + createType: OrderCreateTypeV5; + orderType: OrderTypeV5; + execFee: string; + execFeeV2: string; + feeCurrency: string; // Trading fee currency + parentExecId: string; + execId: string; + execPrice: string; + execQty: string; + execPnl: string; + execType: ExecTypeV5; + execValue: string; + execTime: string; + isMaker: boolean; + feeRate: string; + markPrice: string; + closedSize: string; + seq: number; } ⋮---- -/** @deprecated Use `chains[].withdrawMax` instead */ +feeCurrency: string; // Trading fee currency ⋮---- -/** Max withdraw amount per transaction per chain. `-1` means no limit */ +export type WSSpreadExecutionEventV5 = WSPrivateTopicEventV5< + 'spread.execution', + WSSpreadExecutionV5[] +>; ⋮---- -export interface WithdrawalRecordV5 { - withdrawId: string; - txID: string; - withdrawType: WithdrawalTypeV5; +export interface WSInsuranceV5 { coin: string; - chain: string; - amount: string; - withdrawFee: string; - status: string; - toAddress: string; - tag: string; - createTime: string; + symbols: string; + balance: string; updateTime: string; } ⋮---- -export interface WithdrawalAddressV5 { - coin: string; - chain: string; - address: string; - tag: string; - remark: string; - status: number; - addressType: number; - verified: number; - createdAt: string; +export type WSInsuranceEventV5 = WSPublicTopicEventV5< + 'insurance.USDT' | 'insurance.USDC' | 'insurance.inverse', + 'snapshot' | 'delta', + WSInsuranceV5[] +>; +⋮---- +export interface WSPriceLimitV5 { + symbol: string; + buyLmt: string; + sellLmt: string; } ⋮---- -export interface WithdrawableAccountSliceV5 { - coin: string; - withdrawableAmount: string; - availableBalance: string; +export type WSPriceLimitEventV5 = WSPublicTopicEventV5< + string, + 'snapshot', + WSPriceLimitV5 +>; +⋮---- +export interface WSADLAlertV5 { + c: string; // Token of the insurance pool + s: string; // Trading pair name + b: string; // Balance of the insurance fund. For shared insurance pool, follows T+1 refresh (updated daily at 00:00 UTC) + mb: string; // Deprecated: always returns empty string. Previously: Maximum balance of the insurance pool in the last 8 hours + i_pr: string; // PnL ratio threshold for triggering contract PnL drawdown ADL + pr: string; // Symbol's PnL drawdown ratio in the last 8 hours. Used to determine whether ADL is triggered or stopped + adl_tt: string; // Trigger threshold for contract PnL drawdown ADL + adl_sr: string; // Stop ratio threshold for contract PnL drawdown ADL } ⋮---- +c: string; // Token of the insurance pool +s: string; // Trading pair name +b: string; // Balance of the insurance fund. For shared insurance pool, follows T+1 refresh (updated daily at 00:00 UTC) +mb: string; // Deprecated: always returns empty string. Previously: Maximum balance of the insurance pool in the last 8 hours +i_pr: string; // PnL ratio threshold for triggering contract PnL drawdown ADL +pr: string; // Symbol's PnL drawdown ratio in the last 8 hours. Used to determine whether ADL is triggered or stopped +adl_tt: string; // Trigger threshold for contract PnL drawdown ADL +adl_sr: string; // Stop ratio threshold for contract PnL drawdown ADL +⋮---- +export type WSADLAlertEventV5 = WSPublicTopicEventV5< + 'adlAlert.USDT' | 'adlAlert.USDC' | 'adlAlert.inverse', + 'snapshot', + WSADLAlertV5[] +>; +⋮---- +export type WSSystemStatusEventV5 = WSPublicTopicEventV5< + 'system.status', + 'snapshot', + SystemStatusItemV5[] +>; +⋮---- +/** + * RFQ WebSocket Events + */ +⋮---- +/** + * RFQ Inquiry Channel + * Private push for RFQ inquiries sent or received by the user + * Topics: rfq.open.rfqs, rfq.site.rfqs + */ +export type WSRFQInquiryEventV5 = WSPrivateTopicEventV5< + 'rfq.open.rfqs' | 'rfq.site.rfqs', + RFQItemV5[] +>; +⋮---- +/** + * RFQ Quote Channel + * Private push for quotes sent or received by the user + * Topics: rfq.open.quotes, rfq.site.quotes + */ +export type WSRFQQuoteEventV5 = WSPrivateTopicEventV5< + 'rfq.open.quotes' | 'rfq.site.quotes', + RFQQuoteItemV5[] +>; +⋮---- +/** + * RFQ Trade Channel + * Private push for block trades executed by the user + * Topics: rfq.open.trades, rfq.site.trades + */ +export type WSRFQTradeEventV5 = WSPrivateTopicEventV5< + 'rfq.open.trades' | 'rfq.site.trades', + RFQTradeV5[] +>; +⋮---- /** - * GET /v5/asset/withdraw/withdrawable-amount. Only keys with data are returned - * (e.g. UTA, FUND, EARN; EARN when the coin can be withdrawn from Earn; SPOT if present). + * RFQ Public Trade Channel + * Public push for all block trades + * Topics: rfq.open.public.trades, rfq.site.public.trades */ -export interface WithdrawableAmountV5 { - limitAmountUsd: string; - withdrawableAmount: { - SPOT?: WithdrawableAccountSliceV5; - FUND?: WithdrawableAccountSliceV5; - UTA?: WithdrawableAccountSliceV5; - EARN?: WithdrawableAccountSliceV5; - }; -} -⋮---- -export interface VaspEntityV5 { - vaspEntityId: string; - vaspName: string; -} -⋮---- -export interface ConvertCoinSpecV5 { - coin: string; - fullName: string; - icon: string; - iconNight: string; - accuracyLength: number; - coinType: string; - balance: string; - uBalance: string; - singleFromMinLimit: string; - singleFromMaxLimit: string; - disableFrom: boolean; - disableTo: boolean; - timePeriod: number; - singleToMinLimit: string; - singleToMaxLimit: string; - dailyFromMinLimit: string; - dailyFromMaxLimit: string; - dailyToMinLimit: string; - dailyToMaxLimit: string; -} -⋮---- -export interface ConvertQuoteV5 { - quoteTxId: string; - exchangeRate: string; - fromCoin: string; - fromCoinType: string; - toCoin: string; - toCoinType: string; - fromAmount: string; - toAmount: string; - expiredTime: string; - requestId: string; - extTaxAndFee: string[]; -} +export type WSRFQPublicTradeEventV5 = WSPublicTopicEventV5< + 'rfq.open.public.trades' | 'rfq.site.public.trades', + 'snapshot', + RFQPublicTradeV5[] +>; + +================ +File: src/types/request/index.ts +================ + + +================ +File: src/types/request/v5-market.ts +================ +import { KlineIntervalV3 } from '../shared'; +import { + CategoryV5, + InstrumentStatusV5, + InstrumentSymbolTypeV5, + OptionTypeV5, +} from '../shared-v5'; ⋮---- -export interface ConvertStatusV5 { - accountType: string; - exchangeTxId: string; - userId: string; - fromCoin: string; - fromCoinType: string; - toCoin: string; - toCoinType: string; - fromAmount: string; - toAmount: string; - exchangeStatus: 'init' | 'processing' | 'success' | 'failure'; - extInfo: { paramType: string; paramValue: string }; - convertRate: string; - createdAt: string; +export interface GetKlineParamsV5 { + category: 'spot' | 'linear' | 'inverse'; + symbol: string; + interval: KlineIntervalV3; + start?: number; + end?: number; + limit?: number; } ⋮---- -export interface ConvertHistoryRecordV5 { - accountType: string; - exchangeTxId: string; - userId: string; - fromCoin: string; - fromCoinType: string; - toCoin: string; - toCoinType: string; - fromAmount: string; - toAmount: string; - exchangeStatus: 'init' | 'processing' | 'success' | 'failure'; - extInfo: { paramType: string; paramValue: string }; - convertRate: string; - createdAt: string; +export interface GetMarkPriceKlineParamsV5 { + /** + * linear (default if omitted), inverse, or option. + */ + category?: 'linear' | 'inverse' | 'option'; + symbol: string; + interval: KlineIntervalV3; + start?: number; + end?: number; + /** + * Futures: [1, 1000], default 200. Options: [1, 500], default 200. + */ + limit?: number; } ⋮---- -export interface SmallBalanceCoinV5 { - fromCoin: string; // Source currency - supportConvert: 1 | 2; // 1: support, 2: not supported - availableBalance: string; // Available balance - baseValue: string; // USDT equivalent value - toAmount: string; // Reserved field - exchangeRate: string; // Reserved field - feeInfo: null; // Reserved field - taxFeeInfo: null; // Reserved field -} +/** + * linear (default if omitted), inverse, or option. + */ ⋮---- -fromCoin: string; // Source currency -supportConvert: 1 | 2; // 1: support, 2: not supported -availableBalance: string; // Available balance -baseValue: string; // USDT equivalent value -toAmount: string; // Reserved field -exchangeRate: string; // Reserved field -feeInfo: null; // Reserved field -taxFeeInfo: null; // Reserved field +/** + * Futures: [1, 1000], default 200. Options: [1, 500], default 200. + */ ⋮---- -export interface SmallBalanceListV5 { - smallAssetCoins: SmallBalanceCoinV5[]; // Small balance info - supportToCoins: string[]; // Supported target coins (e.g., ["MNT","USDT","USDC"]) +export interface GetIndexPriceKlineParamsV5 { + category: 'linear' | 'inverse'; + symbol: string; + interval: KlineIntervalV3; + start?: number; + end?: number; + limit?: number; } ⋮---- -smallAssetCoins: SmallBalanceCoinV5[]; // Small balance info -supportToCoins: string[]; // Supported target coins (e.g., ["MNT","USDT","USDC"]) -⋮---- -export interface FiatCoinInfoV5 { - coin: string; // Fiat coin code - fullName: string; // Fiat full coin name - icon: string; // Coin icon url - iconNight: string; // Coin icon url (dark mode) - precision: number; // Fiat precision - disable: boolean; // true: the coin is disabled, false: the coin is allowed - singleFromMinLimit: string; // For buy side, minimum amount of fiatCoin per transaction - singleFromMaxLimit: string; // For buy side, maximum amount of fiatCoin per transaction +export interface GetPremiumIndexPriceKlineParamsV5 { + category: 'linear'; + symbol: string; + interval: KlineIntervalV3; + start?: number; + end?: number; + limit?: number; } ⋮---- -coin: string; // Fiat coin code -fullName: string; // Fiat full coin name -icon: string; // Coin icon url -iconNight: string; // Coin icon url (dark mode) -precision: number; // Fiat precision -disable: boolean; // true: the coin is disabled, false: the coin is allowed -singleFromMinLimit: string; // For buy side, minimum amount of fiatCoin per transaction -singleFromMaxLimit: string; // For buy side, maximum amount of fiatCoin per transaction -⋮---- -export interface CryptoCoinInfoV5 { - coin: string; // Crypto coin code - fullName: string; // Crypto full coin name - icon: string; // Coin icon url - iconNight: string; // Coin icon url (dark mode) - precision: number; // Crypto precision - disable: boolean; // true: the coin is disabled, false: the coin is allowed - singleFromMinLimit: string; // For sell side, minimum amount of cryptoCoin per transaction - singleFromMaxLimit: string; // For sell side, maximum amount of cryptoCoin per transaction +export interface GetInstrumentsInfoParamsV5 { + category: CategoryV5; + symbol?: string; + /** Filter by instrument `symbolType` (e.g. `commodity`, `stock`, `forex` for linear). */ + symbolType?: InstrumentSymbolTypeV5; + status?: InstrumentStatusV5; + /** For `category=option`, pass `All` to return all option symbols. */ + baseCoin?: string; + limit?: number; + cursor?: string; } ⋮---- -coin: string; // Crypto coin code -fullName: string; // Crypto full coin name -icon: string; // Coin icon url -iconNight: string; // Coin icon url (dark mode) -precision: number; // Crypto precision -disable: boolean; // true: the coin is disabled, false: the coin is allowed -singleFromMinLimit: string; // For sell side, minimum amount of cryptoCoin per transaction -singleFromMaxLimit: string; // For sell side, maximum amount of cryptoCoin per transaction -⋮---- -export interface FiatTradingPairListV5 { - fiats: FiatCoinInfoV5[]; // Fiat coin list - cryptos: CryptoCoinInfoV5[]; // Crypto coin list -} +/** Filter by instrument `symbolType` (e.g. `commodity`, `stock`, `forex` for linear). */ ⋮---- -fiats: FiatCoinInfoV5[]; // Fiat coin list -cryptos: CryptoCoinInfoV5[]; // Crypto coin list +/** For `category=option`, pass `All` to return all option symbols. */ ⋮---- -export interface FundingAccountTransactionRecordV5 { - memberId: string; - currency: string; - ioDirection: string; - txnAmt: string; - afterAmt: string; - createTime: string; - showBusiType: string; - showBusiTypeEn: string; - description: string; - descriptionEn: string; - currcCursor?: string; +/** + * GET /v5/market/instrument-summary + * + * `category` is required. Page with `cursor` = previous `nextPageCursor`. + */ +export interface GetInstrumentSummaryParamsV5 { + /** Product type. `linear` or `option`. */ + category: 'linear' | 'option'; + symbol?: string; + /** Instrument type. */ + symbolType?: string; + /** Market region, for example `HK`, `US`, `CN`, `KR`. */ + marketRegion?: string; + /** Base coin, for example `NVDA` or `TSLA`. */ + baseCoin?: string; + /** Page size. Range [1, 1000]. Default 500. */ + limit?: number; + /** Cursor. Use `nextPageCursor` from the previous response. */ + cursor?: string; } ⋮---- -/** When accountType=Alpha and category is farm, under `coinDetail` in sub-categories. */ -export interface AssetOverviewCoinExtMapV5 { - priceUpper?: string; - priceLower?: string; - equityUnit?: string; -} +/** Product type. `linear` or `option`. */ ⋮---- -export interface AssetOverviewCoinDetailV5 { - coin: string; - equity: string; - extMap?: AssetOverviewCoinExtMapV5; -} +/** Instrument type. */ ⋮---- -export interface AssetOverviewCategoryV5 { - category: string; - equity: string; - coinDetail: AssetOverviewCoinDetailV5[]; -} +/** Market region, for example `HK`, `US`, `CN`, `KR`. */ ⋮---- -export interface AssetOverviewAccountItemV5 { - accountType: string; - totalEquity: string; - valuationCurrency: string; - snapshotTime: string; - coinDetail?: AssetOverviewCoinDetailV5[]; - categories?: AssetOverviewCategoryV5[]; +/** Base coin, for example `NVDA` or `TSLA`. */ +⋮---- +/** Page size. Range [1, 1000]. Default 500. */ +⋮---- +/** Cursor. Use `nextPageCursor` from the previous response. */ +⋮---- +export interface GetOrderbookParamsV5 { + category: CategoryV5; + symbol: string; + limit?: number; } ⋮---- -export interface AssetOverviewResultV5 { - totalEquity: string; - list: AssetOverviewAccountItemV5[]; +export interface GetRPIOrderbookParamsV5 { + category?: 'spot' | 'linear' | 'inverse'; + symbol: string; + limit: number; // Required for RPI orderbook, [1, 50] } ⋮---- -// --- GET /v5/asset/portfolio-margin (portfolio margin P&L ranges) --- +limit: number; // Required for RPI orderbook, [1, 50] ⋮---- -export interface PortfolioMarginWalletV5 { - equity: string; - cashBalance: string; - marginBalance: string; - availableBalance: string; - accountIM: string; - accountMM: string; - accountMMRate: string; - accountIMRate: string; +export interface GetIndexPriceComponentsParamsV5 { + indexName: string; // Index name, like BTCUSDT } ⋮---- -export interface PortfolioMarginPnlRangePointV5 { - priceScale: string; - pnls: string[]; -} +indexName: string; // Index name, like BTCUSDT ⋮---- -export interface PortfolioMarginContractBucketPnlV5 { - pnlRanges: PortfolioMarginPnlRangePointV5[]; +export interface GetADLAlertParamsV5 { + symbol?: string; // Contract name, e.g. BTCUSDT. Uppercase only } ⋮---- -export interface PortfolioMarginTotalPnlRangesV5 { - ALL?: PortfolioMarginContractBucketPnlV5; - PERPETUAL?: PortfolioMarginContractBucketPnlV5; - OPTION?: PortfolioMarginContractBucketPnlV5; +symbol?: string; // Contract name, e.g. BTCUSDT. Uppercase only +⋮---- +export interface GetFeeGroupStructureParamsV5 { + productType: string; // Product type. contract only for now + groupId?: string; // Group ID. 1, 2, 3, 4, 5, 6, 7 } ⋮---- -export interface PortfolioMarginPerpPositionPnlV5 { - symbolName: string; - position: string; - pnlRanges: PortfolioMarginPnlRangePointV5[]; - sessionAvgPrice: string; - markPrice: string; - orderSize: string; - contractType: number; - settleCoin: string; - symbolAlias?: string; +productType: string; // Product type. contract only for now +groupId?: string; // Group ID. 1, 2, 3, 4, 5, 6, 7 +⋮---- +export interface GetTickersParamsV5 { + category: TCategory; + symbol?: string; + baseCoin?: string; + expDate?: string; } ⋮---- -export interface PortfolioMarginOptionPositionPnlV5 { - symbolName: string; - position: string; - pnlRanges: PortfolioMarginPnlRangePointV5[]; - sessionAvgPrice: string; - markPrice: string; - orderSize: string; - contractType: number; - settleCoin: string; +export interface GetFundingRateHistoryParamsV5 { + category: 'linear' | 'inverse'; + symbol: string; + startTime?: number; + endTime?: number; + limit?: number; } ⋮---- -export interface PortfolioMarginOptionExpiryPnlV5 { - expiryDateRepresentation: string; - pnlRanges: PortfolioMarginPnlRangePointV5[]; - optionPositionPnlRanges: PortfolioMarginOptionPositionPnlV5[]; +export interface GetPublicTradingHistoryParamsV5 { + category: CategoryV5; + symbol: string; + baseCoin?: string; + optionType?: OptionTypeV5; + limit?: number; } ⋮---- -export interface PortfolioMarginContingencyV5 { - optionContingency: string; - futureDeltaContingency: string; - optionVegaContingency: string; - contingencyComponents: string; - usdtUsdcContingency: string; - futureContingency: string; +export type OpenInterestIntervalV5 = + | '5min' + | '15min' + | '30min' + | '1h' + | '4h' + | '1d'; +⋮---- +export interface GetOpenInterestParamsV5 { + category: 'linear' | 'inverse'; + symbol: string; + intervalTime: OpenInterestIntervalV5; + startTime?: number; + endTime?: number; + limit?: number; + cursor?: string; } ⋮---- -export interface PortfolioMarginAssetBlockV5 { - coin: string; - assetIM: string; - assetMM: string; +export interface GetHistoricalVolatilityParamsV5 { + category: 'option'; + baseCoin?: string; + period?: 7 | 14 | 21 | 30 | 60 | 90 | 180 | 270; + startTime?: number; + endTime?: number; } ⋮---- -export interface PortfolioMarginSpotHedgeInfoV5 { - hedgeSpotSize: string; - walletBalance: string; - usdIndexPrice: string; - pnlRanges: PortfolioMarginPnlRangePointV5[]; +export interface GetInsuranceParamsV5 { + coin?: string; } ⋮---- -export interface PortfolioMarginByBaseCoinV5 { - baseCoin: string; - totalPnlRanges: PortfolioMarginTotalPnlRangesV5; - perpPositionPnlRanges: PortfolioMarginPerpPositionPnlV5[]; - optionExpiryDatePnlRanges: PortfolioMarginOptionExpiryPnlV5[]; - contingency: PortfolioMarginContingencyV5; - asset: PortfolioMarginAssetBlockV5; - maxLossPriceMove: string; - maxLossIvShock: string; - totalClosePzFee: string; - spotHedgeInfo: PortfolioMarginSpotHedgeInfoV5; - maxLossIvShockList: string[]; +export interface GetRiskLimitParamsV5 { + category?: 'linear' | 'inverse'; + symbol?: string; + cursor?: string; } ⋮---- -export interface PortfolioMarginInfoResultV5 { - wallet: PortfolioMarginWalletV5; - assetPnlRange: PortfolioMarginByBaseCoinV5[]; +export interface GetOptionDeliveryPriceParamsV5 { + category: 'option'; + symbol?: string; + baseCoin?: string; + limit?: number; + cursor?: string; } ⋮---- -// --- GET /v5/asset/total-members-assets --- +export interface GetDeliveryPriceParamsV5 { + category: 'linear' | 'inverse' | 'option'; + symbol?: string; + baseCoin?: string; + settleCoin?: string; + limit?: number; + cursor?: string; +} ⋮---- -export interface TotalMembersAccountBreakdownItemV5 { - type: string; - origb: string; - quoteb: string; - stat: number; +export interface GetLongShortRatioParamsV5 { + category: 'linear' | 'inverse'; + symbol: string; + period: OpenInterestIntervalV5; + startTime?: string; + endTime?: string; + limit?: number; + cursor?: string; } ⋮---- -export interface TotalMembersMemberEntryV5 { - uid: number; - isM?: boolean; - type?: number; - stat: number; - origb: string; - quoteb?: string; - items: TotalMembersAccountBreakdownItemV5[]; +export interface GetFullDepthOrderbookParamsV5 { + category: 'spot' | 'linear' | 'inverse'; + symbol: string; } ⋮---- -export interface TotalMembersAssetsResultV5 { - total: string; - quoteTotal: string; - stat: number; - list: TotalMembersMemberEntryV5[]; +export interface GetOptionBaseCoinsParamsV5 { + /** + * Comma-separated underlying types. + * 0 crypto, 1 commodity, 2 stock, 3 forex, 4 oil. Omit to return all types. + */ + underlyingType?: string; } +⋮---- +/** + * Comma-separated underlying types. + * 0 crypto, 1 commodity, 2 stock, 3 forex, 4 oil. Omit to return all types. + */ + +================ +File: src/types/response/index.ts +================ + ================ File: src/types/response/v5-market.ts @@ -16453,6 +16926,8 @@ import { GetPwmInvestmentPlanDetailParamsV5, GetPwmInvestmentPlanOrdersParamsV5, GetPwmPendingInvestmentPlanDetailParamsV5, + GetReferralCommissionRecordsParamsV5, + GetReferralUserInvitationsParamsV5, GetRenewOrderInfoFixedParamsV5, GetRepaymentHistoryFixedParamsV5, GetRepaymentHistoryFlexibleParamsV5, @@ -16602,7 +17077,11 @@ import { RedeemFixedTermEarnResultV5, RedeemPwmInvestmentPlanParamsV5, RedeemPwmInvestmentPlanResultV5, + ReferralCampaignRewardsResultV5, ReferralCodesResultV5, + ReferralCommissionRecordsResultV5, + ReferralUserIdentityProfileV5, + ReferralUserInvitationsResultV5, ReinvestLiquidityMiningParamsV5, ReinvestLiquidityMiningResultV5, RenewBorrowOrderFixedParamsV5, @@ -18726,6 +19205,55 @@ getFriendReferrals(params?: GetFriendReferralsParamsV5): Promise< ⋮---- getReferralCode(): Promise> ⋮---- +/** + * Query referral commission records for the authenticated inviter. + * + * The inviter comes from the API key. Do not send an inviter user ID. + * Response `userId` is a masked invitee ID. A JSON body is required; pass + * `{}` or omit `params` when no filter is needed. Property names follow the + * proto camelCase names. Gateway serialization is not independently verified. + */ +getReferralCommissionRecords( + params?: GetReferralCommissionRecordsParamsV5, +): Promise> +⋮---- +/** + * Get referral rules and configured campaign tasks for the current site. + * + * Static configuration only. This does not return task progress, reward + * claims, or payouts. `tasks` entries are JSON strings + * (`ReferralCampaignTaskPayloadV5`). Send an empty JSON object. + */ +getReferralCampaignRewards(): Promise< + APIResponseV3WithTime + > { +return this.postPrivate('/v5/referral/campaign/rewards', +⋮---- +/** + * Get the authenticated user's referral identity and available commission. + * + * `inviterAffiliateUserId` and `inviterUserId` are relationship flags + * (`1` or `0`), not user IDs. `commissionInfo` is present only when an M1 + * inviter record matches this user and the commission query succeeds. + * Send an empty JSON object. Gateway serialization, including int64 and + * enum representation, is not independently verified. + */ +getReferralUserIdentityProfile(): Promise< + APIResponseV3WithTime + > { +return this.postPrivate('/v5/referral/user/identity-profile', +⋮---- +/** + * Query invitation records for the authenticated referral user. + * + * Do not send the caller's user ID. A JSON body is required; pass `{}` or + * omit `params` when no filter is needed. Gateway serialization is not + * independently verified. + */ +getReferralUserInvitations( + params?: GetReferralUserInvitationsParamsV5, +): Promise> +⋮---- /** * Sign Agreement * To trade commodity contracts (e.g. metals XAU/XAG perps, crude oil perps), complete the agreement signing first. @@ -23308,7 +23836,7 @@ File: README.md [![last commit](https://img.shields.io/github/last-commit/sieblyio/bybit-api)][1] [![CodeFactor](https://www.codefactor.io/repository/github/sieblyio/bybit-api/badge)](https://www.codefactor.io/repository/github/sieblyio/bybit-api) [![Telegram](https://img.shields.io/badge/chat-on%20telegram-blue.svg)](https://t.me/nodetraders) -[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/sieblyio/bybit-api) +[![Bybit Tutorial](https://img.shields.io/badge/Bybit%20Tutorial-siebly.io-blue)](https://siebly.io/sdk/bybit/javascript/tutorial)

@@ -24108,7 +24636,7 @@ File: package.json ================ { "name": "bybit-api", - "version": "4.8.3", + "version": "4.8.4", "description": "Complete & robust Node.js SDK for Bybit's REST APIs and WebSockets, with TypeScript & strong end to end tests.", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -24133,15 +24661,15 @@ File: package.json "contributors": [], "dependencies": { "@types/ws": "8.18.1", - "axios": "1.18.1", + "axios": "1.20.0", "isomorphic-ws": "4.0.1", "ws": "8.21.1" }, "devDependencies": { "@types/jest": "^29.5.11", "@types/node": "^22.10.7", - "@typescript-eslint/eslint-plugin": "^8.18.0", - "@typescript-eslint/parser": "^8.18.0", + "@typescript-eslint/eslint-plugin": "8.70.0", + "@typescript-eslint/parser": "8.70.0", "eslint": "^8.29.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.1.3", @@ -24157,12 +24685,12 @@ File: package.json "webpack-cli": "^4.2.0" }, "overrides": { - "brace-expansion@<2": "1.1.18", - "brace-expansion@>=2 <3": "2.1.4", - "brace-expansion@>=5 <6": "5.0.9", - "fast-uri@>=3 <4": "3.1.5", - "js-yaml@>=3 <4": "3.15.1", - "js-yaml@>=4 <5": "4.3.1" + "brace-expansion@<2": "1.1.21", + "brace-expansion@>=2 <3": "2.1.7", + "brace-expansion@>=5 <6": "5.0.12", + "fast-uri@>=3 <4": "3.1.8", + "js-yaml@>=3 <4": "3.15.2", + "js-yaml@>=4 <5": "4.3.2" }, "keywords": [ "bybit",