@bluefin-exchange/pro-sdk 1.8.5 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +230 -20
- package/dist/cjs/example.js +5 -1
- package/dist/cjs/example.js.map +1 -1
- package/dist/cjs/src/api.js +198 -6
- package/dist/cjs/src/api.js.map +1 -1
- package/dist/cjs/src/sdk.js +12 -0
- package/dist/cjs/src/sdk.js.map +1 -1
- package/dist/esm/example.js +5 -1
- package/dist/esm/example.js.map +1 -1
- package/dist/esm/src/api.js +198 -6
- package/dist/esm/src/api.js.map +1 -1
- package/dist/esm/src/sdk.js +12 -0
- package/dist/esm/src/sdk.js.map +1 -1
- package/dist/types/src/api.d.ts +195 -4
- package/dist/types/src/api.d.ts.map +1 -1
- package/dist/types/src/sdk.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/cjs/src/api.js
CHANGED
|
@@ -25,8 +25,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
25
25
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
26
|
};
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.
|
|
29
|
-
exports.TradeApi = exports.TradeApiFactory = exports.TradeApiFp = exports.TradeApiAxiosParamCreator = exports.WebSocketMarketDataSecWebSocketVersionEnum = exports.WebSocketMarketDataUpgradeEnum = exports.WebSocketAccountDataSecWebSocketVersionEnum = exports.WebSocketAccountDataUpgradeEnum = exports.StreamsApi = exports.StreamsApiFactory = exports.StreamsApiFp = exports.StreamsApiAxiosParamCreator = exports.GetRewardsEpochMetadataEpochEnum = exports.GetRewardsCampaignMetadataStatusEnum = exports.GetAffiliateOverviewSortOrderEnum = exports.GetAffiliateOverviewSortByEnum = exports.GetAffiliateLeaderDashboardSortOrderEnum = exports.GetAffiliateLeaderDashboardSortByEnum = exports.RewardsApi = exports.RewardsApiFactory = exports.RewardsApiFp = exports.RewardsApiAxiosParamCreator = exports.ExchangeApi = exports.ExchangeApiFactory = exports.ExchangeApiFp = exports.ExchangeApiAxiosParamCreator = exports.AuthApi = exports.AuthApiFactory = void 0;
|
|
28
|
+
exports.AccountDataApi = exports.AccountDataApiFactory = exports.AccountDataApiFp = exports.AccountDataApiAxiosParamCreator = exports.UserCampaignRewardsClaimStatusEnum = exports.UserCampaignRewardsStatusEnum = exports.TransactionType = exports.TradeType = exports.TradeSide = exports.SubscriptionType = exports.StatsInterval = exports.SortOrder = exports.SelfTradePreventionType = exports.PositionSide = exports.OrderbookPartialDepthUpdateDepthLevelEnum = exports.OrderType = exports.OrderTimeInForce = exports.OrderStatus = exports.OrderSide = exports.OrderCancellationFailureReason = exports.OrderCancelReason = exports.OraclePriceUpdateSourceEnum = exports.MarketStatus = exports.MarketPriceUpdateSourceEnum = exports.MarketEventType = exports.MarketDataStreamName = exports.MarkPriceUpdateSourceEnum = exports.MarkAsClaimedResponseStatusEnum = exports.MarkAsClaimedRequestCampaignNameEnum = exports.MarginType = exports.LeaderboardInterval = exports.KlineInterval = exports.IntervalRewardsStatusEnum = exports.IntervalMetadataStatusEnum = exports.GetAccountValueHistoryParamsInterval = exports.FailedCommandType = exports.EpochMetadataStatusEnum = exports.ContractsConfigNetworkEnum = exports.CommandFailureReasonCode = exports.ClaimSignatureItemRewardTypeEnum = exports.CandlePriceType = exports.CampaignMetadataStatusEnum = exports.AffiliateOnboardResponseStatusEnum = exports.AffiliateMetadataTierEnum = exports.AffiliateMetadataStatusEnum = exports.AffiliateIntervalOverviewStatusEnum = exports.AdjustMarginOperation = exports.AccountEventType = exports.AccountEventReason = exports.AccountDataStream = void 0;
|
|
29
|
+
exports.TradeApi = exports.TradeApiFactory = exports.TradeApiFp = exports.TradeApiAxiosParamCreator = exports.WebSocketMarketDataSecWebSocketVersionEnum = exports.WebSocketMarketDataUpgradeEnum = exports.WebSocketAccountDataSecWebSocketVersionEnum = exports.WebSocketAccountDataUpgradeEnum = exports.StreamsApi = exports.StreamsApiFactory = exports.StreamsApiFp = exports.StreamsApiAxiosParamCreator = exports.GetRewardsEpochMetadataEpochEnum = exports.GetRewardsCampaignMetadataStatusEnum = exports.GetAffiliateOverviewSortOrderEnum = exports.GetAffiliateOverviewSortByEnum = exports.GetAffiliateLeaderDashboardSortOrderEnum = exports.GetAffiliateLeaderDashboardSortByEnum = exports.RewardsApi = exports.RewardsApiFactory = exports.RewardsApiFp = exports.RewardsApiAxiosParamCreator = exports.GetLeaderboardSortByEnum = exports.ExchangeApi = exports.ExchangeApiFactory = exports.ExchangeApiFp = exports.ExchangeApiAxiosParamCreator = exports.AuthApi = exports.AuthApiFactory = exports.AuthApiFp = exports.AuthApiAxiosParamCreator = void 0;
|
|
30
30
|
const axios_1 = __importDefault(require("axios"));
|
|
31
31
|
// Some imports not used depending on template conditions
|
|
32
32
|
// @ts-ignore
|
|
@@ -123,6 +123,7 @@ exports.CandlePriceType = {
|
|
|
123
123
|
Last: 'Last',
|
|
124
124
|
Market: 'Market',
|
|
125
125
|
Oracle: 'Oracle',
|
|
126
|
+
Mark: 'Mark',
|
|
126
127
|
Unspecified: 'UNSPECIFIED'
|
|
127
128
|
};
|
|
128
129
|
exports.ClaimSignatureItemRewardTypeEnum = {
|
|
@@ -215,6 +216,18 @@ exports.KlineInterval = {
|
|
|
215
216
|
_1Mo: '1Mo',
|
|
216
217
|
Unspecified: 'UNSPECIFIED'
|
|
217
218
|
};
|
|
219
|
+
/**
|
|
220
|
+
*
|
|
221
|
+
* @export
|
|
222
|
+
* @enum {string}
|
|
223
|
+
*/
|
|
224
|
+
exports.LeaderboardInterval = {
|
|
225
|
+
LeaderboardIntervalN1d: '1d',
|
|
226
|
+
LeaderboardIntervalN7d: '7d',
|
|
227
|
+
LeaderboardIntervalN30d: '30d',
|
|
228
|
+
LeaderboardIntervalALLTIME: 'ALL_TIME',
|
|
229
|
+
LeaderboardIntervalUNSPECIFIED: 'UNSPECIFIED'
|
|
230
|
+
};
|
|
218
231
|
/**
|
|
219
232
|
* Margin type.
|
|
220
233
|
* @export
|
|
@@ -484,6 +497,16 @@ exports.SelfTradePreventionType = {
|
|
|
484
497
|
Both: 'BOTH',
|
|
485
498
|
Unspecified: 'UNSPECIFIED'
|
|
486
499
|
};
|
|
500
|
+
/**
|
|
501
|
+
* The order in which results should be sorted.
|
|
502
|
+
* @export
|
|
503
|
+
* @enum {string}
|
|
504
|
+
*/
|
|
505
|
+
exports.SortOrder = {
|
|
506
|
+
Asc: 'ASC',
|
|
507
|
+
Desc: 'DESC',
|
|
508
|
+
Unspecified: 'UNSPECIFIED'
|
|
509
|
+
};
|
|
487
510
|
/**
|
|
488
511
|
*
|
|
489
512
|
* @export
|
|
@@ -802,6 +825,35 @@ const AccountDataApiAxiosParamCreator = function (configuration) {
|
|
|
802
825
|
options: localVarRequestOptions,
|
|
803
826
|
};
|
|
804
827
|
}),
|
|
828
|
+
/**
|
|
829
|
+
* Retrieves the account value history for 24h.
|
|
830
|
+
* @summary /accounts/{accountAddress}/valueHistory
|
|
831
|
+
* @param {string} accountAddress Account address to fetch account value history for.
|
|
832
|
+
* @param {*} [options] Override http request option.
|
|
833
|
+
* @throws {RequiredError}
|
|
834
|
+
*/
|
|
835
|
+
getAccountValueHistoryByAccount: (accountAddress_1, ...args_1) => __awaiter(this, [accountAddress_1, ...args_1], void 0, function* (accountAddress, options = {}) {
|
|
836
|
+
// verify required parameter 'accountAddress' is not null or undefined
|
|
837
|
+
(0, common_1.assertParamExists)('getAccountValueHistoryByAccount', 'accountAddress', accountAddress);
|
|
838
|
+
const localVarPath = `/api/v1/accounts/{accountAddress}/valueHistory`
|
|
839
|
+
.replace(`{${"accountAddress"}}`, encodeURIComponent(String(accountAddress)));
|
|
840
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
841
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
842
|
+
let baseOptions;
|
|
843
|
+
if (configuration) {
|
|
844
|
+
baseOptions = configuration.baseOptions;
|
|
845
|
+
}
|
|
846
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
847
|
+
const localVarHeaderParameter = {};
|
|
848
|
+
const localVarQueryParameter = {};
|
|
849
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
850
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
851
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
852
|
+
return {
|
|
853
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
854
|
+
options: localVarRequestOptions,
|
|
855
|
+
};
|
|
856
|
+
}),
|
|
805
857
|
/**
|
|
806
858
|
* Sets or updates the group ID for a specific account. Accounts belonging to the same group cannot trade against each other. If the groupId is not set, the account will be removed from its group. Only the first 6 characters of the groupID are guaranteed to be respected, longer group IDs may be rejected.
|
|
807
859
|
* @summary Set the group ID for an account.
|
|
@@ -1020,6 +1072,22 @@ const AccountDataApiFp = function (configuration) {
|
|
|
1020
1072
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1021
1073
|
});
|
|
1022
1074
|
},
|
|
1075
|
+
/**
|
|
1076
|
+
* Retrieves the account value history for 24h.
|
|
1077
|
+
* @summary /accounts/{accountAddress}/valueHistory
|
|
1078
|
+
* @param {string} accountAddress Account address to fetch account value history for.
|
|
1079
|
+
* @param {*} [options] Override http request option.
|
|
1080
|
+
* @throws {RequiredError}
|
|
1081
|
+
*/
|
|
1082
|
+
getAccountValueHistoryByAccount(accountAddress, options) {
|
|
1083
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1084
|
+
var _a, _b, _c;
|
|
1085
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAccountValueHistoryByAccount(accountAddress, options);
|
|
1086
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1087
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AccountDataApi.getAccountValueHistoryByAccount']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1088
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1089
|
+
});
|
|
1090
|
+
},
|
|
1023
1091
|
/**
|
|
1024
1092
|
* Sets or updates the group ID for a specific account. Accounts belonging to the same group cannot trade against each other. If the groupId is not set, the account will be removed from its group. Only the first 6 characters of the groupID are guaranteed to be respected, longer group IDs may be rejected.
|
|
1025
1093
|
* @summary Set the group ID for an account.
|
|
@@ -1151,6 +1219,16 @@ const AccountDataApiFactory = function (configuration, basePath, axios) {
|
|
|
1151
1219
|
getAccountValueHistory(interval, options) {
|
|
1152
1220
|
return localVarFp.getAccountValueHistory(interval, options).then((request) => request(axios, basePath));
|
|
1153
1221
|
},
|
|
1222
|
+
/**
|
|
1223
|
+
* Retrieves the account value history for 24h.
|
|
1224
|
+
* @summary /accounts/{accountAddress}/valueHistory
|
|
1225
|
+
* @param {string} accountAddress Account address to fetch account value history for.
|
|
1226
|
+
* @param {*} [options] Override http request option.
|
|
1227
|
+
* @throws {RequiredError}
|
|
1228
|
+
*/
|
|
1229
|
+
getAccountValueHistoryByAccount(accountAddress, options) {
|
|
1230
|
+
return localVarFp.getAccountValueHistoryByAccount(accountAddress, options).then((request) => request(axios, basePath));
|
|
1231
|
+
},
|
|
1154
1232
|
/**
|
|
1155
1233
|
* Sets or updates the group ID for a specific account. Accounts belonging to the same group cannot trade against each other. If the groupId is not set, the account will be removed from its group. Only the first 6 characters of the groupID are guaranteed to be respected, longer group IDs may be rejected.
|
|
1156
1234
|
* @summary Set the group ID for an account.
|
|
@@ -1270,6 +1348,17 @@ class AccountDataApi extends base_1.BaseAPI {
|
|
|
1270
1348
|
getAccountValueHistory(interval, options) {
|
|
1271
1349
|
return (0, exports.AccountDataApiFp)(this.configuration).getAccountValueHistory(interval, options).then((request) => request(this.axios, this.basePath));
|
|
1272
1350
|
}
|
|
1351
|
+
/**
|
|
1352
|
+
* Retrieves the account value history for 24h.
|
|
1353
|
+
* @summary /accounts/{accountAddress}/valueHistory
|
|
1354
|
+
* @param {string} accountAddress Account address to fetch account value history for.
|
|
1355
|
+
* @param {*} [options] Override http request option.
|
|
1356
|
+
* @throws {RequiredError}
|
|
1357
|
+
* @memberof AccountDataApi
|
|
1358
|
+
*/
|
|
1359
|
+
getAccountValueHistoryByAccount(accountAddress, options) {
|
|
1360
|
+
return (0, exports.AccountDataApiFp)(this.configuration).getAccountValueHistoryByAccount(accountAddress, options).then((request) => request(this.axios, this.basePath));
|
|
1361
|
+
}
|
|
1273
1362
|
/**
|
|
1274
1363
|
* Sets or updates the group ID for a specific account. Accounts belonging to the same group cannot trade against each other. If the groupId is not set, the account will be removed from its group. Only the first 6 characters of the groupID are guaranteed to be respected, longer group IDs may be rejected.
|
|
1275
1364
|
* @summary Set the group ID for an account.
|
|
@@ -1813,7 +1902,7 @@ const ExchangeApiAxiosParamCreator = function (configuration) {
|
|
|
1813
1902
|
* @summary /exchange/candlesticks
|
|
1814
1903
|
* @param {string} symbol The market symbol to get the klines for.
|
|
1815
1904
|
* @param {KlineInterval} interval The interval to get the klines for.
|
|
1816
|
-
* @param {CandlePriceType} type Candle price type (last price, market price or
|
|
1905
|
+
* @param {CandlePriceType} type Candle price type (last price, market price, oracle or mark price).
|
|
1817
1906
|
* @param {number} [startTimeAtMillis] Timestamp in milliseconds in ms to get klines from.
|
|
1818
1907
|
* @param {number} [endTimeAtMillis] Timestamp in milliseconds in ms to get klines until.
|
|
1819
1908
|
* @param {number} [limit] Default 50; max 1000.
|
|
@@ -2034,6 +2123,51 @@ const ExchangeApiAxiosParamCreator = function (configuration) {
|
|
|
2034
2123
|
options: localVarRequestOptions,
|
|
2035
2124
|
};
|
|
2036
2125
|
}),
|
|
2126
|
+
/**
|
|
2127
|
+
* Retrieves the leaderboard of traders based on their performance.
|
|
2128
|
+
* @summary /accounts/leaderboard
|
|
2129
|
+
* @param {LeaderboardInterval} [interval] The interval to get the leaderboard for. Default or Unspecified is 7d.
|
|
2130
|
+
* @param {GetLeaderboardSortByEnum} [sortBy] The field to sort by. Default or Unspecified is accountValue.
|
|
2131
|
+
* @param {SortOrder} [sortOrder] The sort order, either ascending (ASC) or descending (DESC). Default or UNSPECIFIED is DESC.
|
|
2132
|
+
* @param {number} [limit] Default 50; max 100.
|
|
2133
|
+
* @param {number} [page] The page number to retrieve in a paginated response.
|
|
2134
|
+
* @param {*} [options] Override http request option.
|
|
2135
|
+
* @throws {RequiredError}
|
|
2136
|
+
*/
|
|
2137
|
+
getLeaderboard: (interval_1, sortBy_1, sortOrder_1, limit_1, page_1, ...args_1) => __awaiter(this, [interval_1, sortBy_1, sortOrder_1, limit_1, page_1, ...args_1], void 0, function* (interval, sortBy, sortOrder, limit, page, options = {}) {
|
|
2138
|
+
const localVarPath = `/api/v1/accounts/leaderboard`;
|
|
2139
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2140
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2141
|
+
let baseOptions;
|
|
2142
|
+
if (configuration) {
|
|
2143
|
+
baseOptions = configuration.baseOptions;
|
|
2144
|
+
}
|
|
2145
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2146
|
+
const localVarHeaderParameter = {};
|
|
2147
|
+
const localVarQueryParameter = {};
|
|
2148
|
+
if (interval !== undefined) {
|
|
2149
|
+
localVarQueryParameter['interval'] = interval;
|
|
2150
|
+
}
|
|
2151
|
+
if (sortBy !== undefined) {
|
|
2152
|
+
localVarQueryParameter['sortBy'] = sortBy;
|
|
2153
|
+
}
|
|
2154
|
+
if (sortOrder !== undefined) {
|
|
2155
|
+
localVarQueryParameter['sortOrder'] = sortOrder;
|
|
2156
|
+
}
|
|
2157
|
+
if (limit !== undefined) {
|
|
2158
|
+
localVarQueryParameter['limit'] = limit;
|
|
2159
|
+
}
|
|
2160
|
+
if (page !== undefined) {
|
|
2161
|
+
localVarQueryParameter['page'] = page;
|
|
2162
|
+
}
|
|
2163
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2164
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2165
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2166
|
+
return {
|
|
2167
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2168
|
+
options: localVarRequestOptions,
|
|
2169
|
+
};
|
|
2170
|
+
}),
|
|
2037
2171
|
/**
|
|
2038
2172
|
* Retrieves aggregated ticker data for a market.
|
|
2039
2173
|
* @summary /exchange/ticker
|
|
@@ -2181,7 +2315,7 @@ const ExchangeApiFp = function (configuration) {
|
|
|
2181
2315
|
* @summary /exchange/candlesticks
|
|
2182
2316
|
* @param {string} symbol The market symbol to get the klines for.
|
|
2183
2317
|
* @param {KlineInterval} interval The interval to get the klines for.
|
|
2184
|
-
* @param {CandlePriceType} type Candle price type (last price, market price or
|
|
2318
|
+
* @param {CandlePriceType} type Candle price type (last price, market price, oracle or mark price).
|
|
2185
2319
|
* @param {number} [startTimeAtMillis] Timestamp in milliseconds in ms to get klines from.
|
|
2186
2320
|
* @param {number} [endTimeAtMillis] Timestamp in milliseconds in ms to get klines until.
|
|
2187
2321
|
* @param {number} [limit] Default 50; max 1000.
|
|
@@ -2283,6 +2417,26 @@ const ExchangeApiFp = function (configuration) {
|
|
|
2283
2417
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2284
2418
|
});
|
|
2285
2419
|
},
|
|
2420
|
+
/**
|
|
2421
|
+
* Retrieves the leaderboard of traders based on their performance.
|
|
2422
|
+
* @summary /accounts/leaderboard
|
|
2423
|
+
* @param {LeaderboardInterval} [interval] The interval to get the leaderboard for. Default or Unspecified is 7d.
|
|
2424
|
+
* @param {GetLeaderboardSortByEnum} [sortBy] The field to sort by. Default or Unspecified is accountValue.
|
|
2425
|
+
* @param {SortOrder} [sortOrder] The sort order, either ascending (ASC) or descending (DESC). Default or UNSPECIFIED is DESC.
|
|
2426
|
+
* @param {number} [limit] Default 50; max 100.
|
|
2427
|
+
* @param {number} [page] The page number to retrieve in a paginated response.
|
|
2428
|
+
* @param {*} [options] Override http request option.
|
|
2429
|
+
* @throws {RequiredError}
|
|
2430
|
+
*/
|
|
2431
|
+
getLeaderboard(interval, sortBy, sortOrder, limit, page, options) {
|
|
2432
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2433
|
+
var _a, _b, _c;
|
|
2434
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getLeaderboard(interval, sortBy, sortOrder, limit, page, options);
|
|
2435
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2436
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ExchangeApi.getLeaderboard']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2437
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2438
|
+
});
|
|
2439
|
+
},
|
|
2286
2440
|
/**
|
|
2287
2441
|
* Retrieves aggregated ticker data for a market.
|
|
2288
2442
|
* @summary /exchange/ticker
|
|
@@ -2361,7 +2515,7 @@ const ExchangeApiFactory = function (configuration, basePath, axios) {
|
|
|
2361
2515
|
* @summary /exchange/candlesticks
|
|
2362
2516
|
* @param {string} symbol The market symbol to get the klines for.
|
|
2363
2517
|
* @param {KlineInterval} interval The interval to get the klines for.
|
|
2364
|
-
* @param {CandlePriceType} type Candle price type (last price, market price or
|
|
2518
|
+
* @param {CandlePriceType} type Candle price type (last price, market price, oracle or mark price).
|
|
2365
2519
|
* @param {number} [startTimeAtMillis] Timestamp in milliseconds in ms to get klines from.
|
|
2366
2520
|
* @param {number} [endTimeAtMillis] Timestamp in milliseconds in ms to get klines until.
|
|
2367
2521
|
* @param {number} [limit] Default 50; max 1000.
|
|
@@ -2427,6 +2581,20 @@ const ExchangeApiFactory = function (configuration, basePath, axios) {
|
|
|
2427
2581
|
getFundingRateHistory(symbol, limit, startTimeAtMillis, endTimeAtMillis, page, options) {
|
|
2428
2582
|
return localVarFp.getFundingRateHistory(symbol, limit, startTimeAtMillis, endTimeAtMillis, page, options).then((request) => request(axios, basePath));
|
|
2429
2583
|
},
|
|
2584
|
+
/**
|
|
2585
|
+
* Retrieves the leaderboard of traders based on their performance.
|
|
2586
|
+
* @summary /accounts/leaderboard
|
|
2587
|
+
* @param {LeaderboardInterval} [interval] The interval to get the leaderboard for. Default or Unspecified is 7d.
|
|
2588
|
+
* @param {GetLeaderboardSortByEnum} [sortBy] The field to sort by. Default or Unspecified is accountValue.
|
|
2589
|
+
* @param {SortOrder} [sortOrder] The sort order, either ascending (ASC) or descending (DESC). Default or UNSPECIFIED is DESC.
|
|
2590
|
+
* @param {number} [limit] Default 50; max 100.
|
|
2591
|
+
* @param {number} [page] The page number to retrieve in a paginated response.
|
|
2592
|
+
* @param {*} [options] Override http request option.
|
|
2593
|
+
* @throws {RequiredError}
|
|
2594
|
+
*/
|
|
2595
|
+
getLeaderboard(interval, sortBy, sortOrder, limit, page, options) {
|
|
2596
|
+
return localVarFp.getLeaderboard(interval, sortBy, sortOrder, limit, page, options).then((request) => request(axios, basePath));
|
|
2597
|
+
},
|
|
2430
2598
|
/**
|
|
2431
2599
|
* Retrieves aggregated ticker data for a market.
|
|
2432
2600
|
* @summary /exchange/ticker
|
|
@@ -2488,7 +2656,7 @@ class ExchangeApi extends base_1.BaseAPI {
|
|
|
2488
2656
|
* @summary /exchange/candlesticks
|
|
2489
2657
|
* @param {string} symbol The market symbol to get the klines for.
|
|
2490
2658
|
* @param {KlineInterval} interval The interval to get the klines for.
|
|
2491
|
-
* @param {CandlePriceType} type Candle price type (last price, market price or
|
|
2659
|
+
* @param {CandlePriceType} type Candle price type (last price, market price, oracle or mark price).
|
|
2492
2660
|
* @param {number} [startTimeAtMillis] Timestamp in milliseconds in ms to get klines from.
|
|
2493
2661
|
* @param {number} [endTimeAtMillis] Timestamp in milliseconds in ms to get klines until.
|
|
2494
2662
|
* @param {number} [limit] Default 50; max 1000.
|
|
@@ -2560,6 +2728,21 @@ class ExchangeApi extends base_1.BaseAPI {
|
|
|
2560
2728
|
getFundingRateHistory(symbol, limit, startTimeAtMillis, endTimeAtMillis, page, options) {
|
|
2561
2729
|
return (0, exports.ExchangeApiFp)(this.configuration).getFundingRateHistory(symbol, limit, startTimeAtMillis, endTimeAtMillis, page, options).then((request) => request(this.axios, this.basePath));
|
|
2562
2730
|
}
|
|
2731
|
+
/**
|
|
2732
|
+
* Retrieves the leaderboard of traders based on their performance.
|
|
2733
|
+
* @summary /accounts/leaderboard
|
|
2734
|
+
* @param {LeaderboardInterval} [interval] The interval to get the leaderboard for. Default or Unspecified is 7d.
|
|
2735
|
+
* @param {GetLeaderboardSortByEnum} [sortBy] The field to sort by. Default or Unspecified is accountValue.
|
|
2736
|
+
* @param {SortOrder} [sortOrder] The sort order, either ascending (ASC) or descending (DESC). Default or UNSPECIFIED is DESC.
|
|
2737
|
+
* @param {number} [limit] Default 50; max 100.
|
|
2738
|
+
* @param {number} [page] The page number to retrieve in a paginated response.
|
|
2739
|
+
* @param {*} [options] Override http request option.
|
|
2740
|
+
* @throws {RequiredError}
|
|
2741
|
+
* @memberof ExchangeApi
|
|
2742
|
+
*/
|
|
2743
|
+
getLeaderboard(interval, sortBy, sortOrder, limit, page, options) {
|
|
2744
|
+
return (0, exports.ExchangeApiFp)(this.configuration).getLeaderboard(interval, sortBy, sortOrder, limit, page, options).then((request) => request(this.axios, this.basePath));
|
|
2745
|
+
}
|
|
2563
2746
|
/**
|
|
2564
2747
|
* Retrieves aggregated ticker data for a market.
|
|
2565
2748
|
* @summary /exchange/ticker
|
|
@@ -2601,6 +2784,15 @@ class ExchangeApi extends base_1.BaseAPI {
|
|
|
2601
2784
|
}
|
|
2602
2785
|
}
|
|
2603
2786
|
exports.ExchangeApi = ExchangeApi;
|
|
2787
|
+
/**
|
|
2788
|
+
* @export
|
|
2789
|
+
*/
|
|
2790
|
+
exports.GetLeaderboardSortByEnum = {
|
|
2791
|
+
GetLeaderboardSortByAccountValue: 'accountValue',
|
|
2792
|
+
GetLeaderboardSortByPnL: 'pnl',
|
|
2793
|
+
GetLeaderboardSortByVolume: 'volume',
|
|
2794
|
+
GetLeaderboardSortByUNSPECIFIED: 'UNSPECIFIED'
|
|
2795
|
+
};
|
|
2604
2796
|
/**
|
|
2605
2797
|
* RewardsApi - axios parameter creator
|
|
2606
2798
|
* @export
|