@bluefin-exchange/pro-sdk 0.1.61 → 0.2.0-pre-release.1
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/dist/{example.js → cjs/example.js} +3 -0
- package/dist/cjs/example.js.map +1 -0
- package/dist/{index.js → cjs/index.js} +1 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/{src → cjs/src}/api.js +75 -1
- package/dist/cjs/src/api.js.map +1 -0
- package/dist/{src → cjs/src}/base.js +5 -1
- package/dist/cjs/src/base.js.map +1 -0
- package/dist/{src → cjs/src}/common.js +1 -0
- package/dist/cjs/src/common.js.map +1 -0
- package/dist/{src → cjs/src}/configuration.js +1 -0
- package/dist/cjs/src/configuration.js.map +1 -0
- package/dist/{src → cjs/src}/index.js +1 -0
- package/dist/cjs/src/index.js.map +1 -0
- package/dist/{src → cjs/src}/request-signer.js +11 -0
- package/dist/cjs/src/request-signer.js.map +1 -0
- package/dist/{src → cjs/src}/sdk.js +47 -4
- package/dist/cjs/src/sdk.js.map +1 -0
- package/dist/{src → cjs/src}/utils.js +1 -0
- package/dist/cjs/src/utils.js.map +1 -0
- package/dist/{src → cjs/src}/websocket.js +1 -0
- package/dist/cjs/src/websocket.js.map +1 -0
- package/dist/esm/example.js +218 -0
- package/dist/esm/example.js.map +1 -0
- package/dist/esm/index.js +18 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/src/api.js +4318 -0
- package/dist/esm/src/api.js.map +1 -0
- package/dist/esm/src/base.js +69 -0
- package/dist/esm/src/base.js.map +1 -0
- package/dist/esm/src/common.js +162 -0
- package/dist/esm/src/common.js.map +1 -0
- package/dist/esm/src/configuration.js +45 -0
- package/dist/esm/src/configuration.js.map +1 -0
- package/dist/esm/src/index.js +23 -0
- package/dist/esm/src/index.js.map +1 -0
- package/dist/esm/src/request-signer.js +231 -0
- package/dist/esm/src/request-signer.js.map +1 -0
- package/dist/esm/src/sdk.js +786 -0
- package/dist/esm/src/sdk.js.map +1 -0
- package/dist/esm/src/utils.js +10 -0
- package/dist/esm/src/utils.js.map +1 -0
- package/dist/esm/src/websocket.js +159 -0
- package/dist/esm/src/websocket.js.map +1 -0
- package/dist/types/example.d.ts +2 -0
- package/dist/types/example.d.ts.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/{src → types/src}/api.d.ts +126 -47
- package/dist/types/src/api.d.ts.map +1 -0
- package/dist/{src → types/src}/base.d.ts +1 -0
- package/dist/types/src/base.d.ts.map +1 -0
- package/dist/{src → types/src}/common.d.ts +1 -0
- package/dist/types/src/common.d.ts.map +1 -0
- package/dist/{src → types/src}/configuration.d.ts +1 -0
- package/dist/types/src/configuration.d.ts.map +1 -0
- package/dist/{src → types/src}/index.d.ts +1 -0
- package/dist/types/src/index.d.ts.map +1 -0
- package/dist/{src → types/src}/request-signer.d.ts +6 -1
- package/dist/types/src/request-signer.d.ts.map +1 -0
- package/dist/{src → types/src}/sdk.d.ts +12 -1
- package/dist/types/src/sdk.d.ts.map +1 -0
- package/dist/{src → types/src}/utils.d.ts +1 -0
- package/dist/types/src/utils.d.ts.map +1 -0
- package/dist/{src → types/src}/websocket.d.ts +1 -0
- package/dist/types/src/websocket.d.ts.map +1 -0
- package/package.json +21 -7
- package/dist/example.d.ts +0 -1
- package/dist/index.d.ts +0 -1
- package/example.ts +0 -323
- package/index.ts +0 -1
- package/openapitools.json +0 -24
- package/src/.openapi-generator/FILES +0 -128
- package/src/.openapi-generator/VERSION +0 -1
- package/src/.openapi-generator-ignore +0 -28
- package/src/README.md +0 -46
- package/src/api.ts +0 -8918
- package/src/base.ts +0 -86
- package/src/common.ts +0 -150
- package/src/configuration.ts +0 -115
- package/src/docs/Account.md +0 -64
- package/src/docs/AccountAggregatedTradeUpdate.md +0 -21
- package/src/docs/AccountAuthorizationRequest.md +0 -24
- package/src/docs/AccountAuthorizationRequestSignedFields.md +0 -28
- package/src/docs/AccountCommandFailureUpdate.md +0 -29
- package/src/docs/AccountDataApi.md +0 -374
- package/src/docs/AccountDataStream.md +0 -21
- package/src/docs/AccountEventReason.md +0 -25
- package/src/docs/AccountEventType.md +0 -21
- package/src/docs/AccountFundingRateHistory.md +0 -20
- package/src/docs/AccountFundingRateHistoryData.md +0 -30
- package/src/docs/AccountMarketPreference.md +0 -22
- package/src/docs/AccountOrderUpdate.md +0 -71
- package/src/docs/AccountPositionLeverageUpdateRequest.md +0 -22
- package/src/docs/AccountPositionLeverageUpdateRequestSignedFields.md +0 -30
- package/src/docs/AccountPositionUpdate.md +0 -47
- package/src/docs/AccountPreference.md +0 -24
- package/src/docs/AccountStreamMessage.md +0 -25
- package/src/docs/AccountStreamMessagePayload.md +0 -153
- package/src/docs/AccountSubscriptionMessage.md +0 -25
- package/src/docs/AccountTradeUpdate.md +0 -21
- package/src/docs/AccountTransactionUpdate.md +0 -31
- package/src/docs/AccountUpdate.md +0 -61
- package/src/docs/ActiveOrderUpdate.md +0 -65
- package/src/docs/AdjustIsolatedMarginRequest.md +0 -22
- package/src/docs/AdjustIsolatedMarginRequestSignedFields.md +0 -32
- package/src/docs/AdjustMarginOperation.md +0 -11
- package/src/docs/AffiliateIntervalOverview.md +0 -56
- package/src/docs/AffiliateLeaderDashboard.md +0 -38
- package/src/docs/AffiliateMetadata.md +0 -36
- package/src/docs/AffiliateMetadataFees.md +0 -31
- package/src/docs/AffiliateOnboardResponse.md +0 -22
- package/src/docs/AffiliateOverview.md +0 -46
- package/src/docs/AffiliateSummary.md +0 -30
- package/src/docs/Asset.md +0 -29
- package/src/docs/AssetConfig.md +0 -28
- package/src/docs/AuthApi.md +0 -243
- package/src/docs/AuthorizedWallet.md +0 -24
- package/src/docs/CampaignMetadata.md +0 -28
- package/src/docs/CampaignRewards.md +0 -18
- package/src/docs/CancelOrdersRequest.md +0 -23
- package/src/docs/CancelOrdersResponse.md +0 -21
- package/src/docs/CandlePriceType.md +0 -14
- package/src/docs/CandlestickUpdate.md +0 -41
- package/src/docs/CommandFailureReasonCode.md +0 -24
- package/src/docs/ContractsConfig.md +0 -31
- package/src/docs/CreateOrderRequest.md +0 -36
- package/src/docs/CreateOrderRequestSignedFields.md +0 -40
- package/src/docs/CreateOrderResponse.md +0 -20
- package/src/docs/EpochConfigs.md +0 -34
- package/src/docs/EpochConfigsResponse.md +0 -24
- package/src/docs/EpochMetadata.md +0 -30
- package/src/docs/Error.md +0 -22
- package/src/docs/ExchangeApi.md +0 -473
- package/src/docs/ExchangeInfoResponse.md +0 -30
- package/src/docs/FailedCommandType.md +0 -12
- package/src/docs/FeeConfigs.md +0 -33
- package/src/docs/FundingRateEntry.md +0 -24
- package/src/docs/GetAffiliateIntervalOverview200Response.md +0 -26
- package/src/docs/GetAffiliateLeaderDashboard200Response.md +0 -26
- package/src/docs/GetAffiliateOverview200Response.md +0 -26
- package/src/docs/IntervalMetadata.md +0 -28
- package/src/docs/IntervalRewards.md +0 -30
- package/src/docs/KlineInterval.md +0 -36
- package/src/docs/LoginRequest.md +0 -25
- package/src/docs/LoginResponse.md +0 -26
- package/src/docs/MarginType.md +0 -13
- package/src/docs/MarkPriceUpdate.md +0 -26
- package/src/docs/Market.md +0 -82
- package/src/docs/MarketDataStreamName.md +0 -142
- package/src/docs/MarketEventType.md +0 -25
- package/src/docs/MarketPriceUpdate.md +0 -26
- package/src/docs/MarketStatus.md +0 -16
- package/src/docs/MarketStreamMessage.md +0 -23
- package/src/docs/MarketStreamMessagePayload.md +0 -123
- package/src/docs/MarketSubscriptionMessage.md +0 -23
- package/src/docs/MarketSubscriptionStreams.md +0 -23
- package/src/docs/OnboardAffiliateRequest.md +0 -26
- package/src/docs/OnboardAffiliateRequestSocialUserNames.md +0 -27
- package/src/docs/OnboardRefereeRequest.md +0 -20
- package/src/docs/OpenOrderResponse.md +0 -64
- package/src/docs/Operators.md +0 -28
- package/src/docs/OraclePriceUpdate.md +0 -26
- package/src/docs/OrderCancelReason.md +0 -65
- package/src/docs/OrderCancellationFailureReason.md +0 -19
- package/src/docs/OrderCancellationUpdate.md +0 -35
- package/src/docs/OrderSide.md +0 -13
- package/src/docs/OrderStatus.md +0 -25
- package/src/docs/OrderTimeInForce.md +0 -15
- package/src/docs/OrderType.md +0 -29
- package/src/docs/OrderbookDepthResponse.md +0 -38
- package/src/docs/OrderbookDiffDepthUpdate.md +0 -30
- package/src/docs/OrderbookPartialDepthUpdate.md +0 -30
- package/src/docs/Position.md +0 -52
- package/src/docs/PositionSide.md +0 -13
- package/src/docs/RecentTradesUpdates.md +0 -20
- package/src/docs/RefereeOnboardResponse.md +0 -20
- package/src/docs/RefreshTokenRequest.md +0 -20
- package/src/docs/RefreshTokenResponse.md +0 -26
- package/src/docs/RewardsApi.md +0 -859
- package/src/docs/RewardsSummary.md +0 -26
- package/src/docs/SelfTradePreventionType.md +0 -15
- package/src/docs/StatsEntry.md +0 -26
- package/src/docs/StatsInterval.md +0 -14
- package/src/docs/StatsResponse.md +0 -20
- package/src/docs/StreamsApi.md +0 -126
- package/src/docs/SubscriptionResponseMessage.md +0 -23
- package/src/docs/SubscriptionType.md +0 -11
- package/src/docs/TickerAllUpdate.md +0 -20
- package/src/docs/TickerResponse.md +0 -82
- package/src/docs/TickerUpdate.md +0 -83
- package/src/docs/Trade.md +0 -54
- package/src/docs/TradeApi.md +0 -589
- package/src/docs/TradeSide.md +0 -13
- package/src/docs/TradeType.md +0 -15
- package/src/docs/TradingFees.md +0 -24
- package/src/docs/Transaction.md +0 -34
- package/src/docs/TransactionType.md +0 -25
- package/src/docs/UpdateAccountPreferenceRequest.md +0 -24
- package/src/docs/UpdateAffiliateFeeConfigRequest.md +0 -20
- package/src/docs/UserCampaignRewards.md +0 -48
- package/src/docs/WithdrawRequest.md +0 -22
- package/src/docs/WithdrawRequestSignedFields.md +0 -30
- package/src/git_push.sh +0 -57
- package/src/index.ts +0 -6
- package/src/request-signer.ts +0 -405
- package/src/sdk.ts +0 -982
- package/src/utils.ts +0 -6
- package/src/websocket.ts +0 -165
- package/tsconfig.json +0 -23
|
@@ -0,0 +1,4318 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Bluefin API
|
|
6
|
+
* Bluefin API
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.ExchangeApiFactory = exports.ExchangeApiFp = exports.ExchangeApiAxiosParamCreator = exports.AuthApi = exports.AuthApiFactory = exports.AuthApiFp = exports.AuthApiAxiosParamCreator = exports.AccountDataApi = exports.AccountDataApiFactory = exports.AccountDataApiFp = exports.AccountDataApiAxiosParamCreator = exports.UserCampaignRewardsStatusEnum = exports.TransactionType = exports.TradeType = exports.TradeSide = exports.SubscriptionType = exports.StatsInterval = 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.MarginType = exports.KlineInterval = exports.IntervalRewardsStatusEnum = exports.IntervalMetadataStatusEnum = exports.FailedCommandType = exports.EpochMetadataStatusEnum = exports.ContractsConfigNetworkEnum = exports.CommandFailureReasonCode = 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.ExchangeApi = void 0;
|
|
30
|
+
const axios_1 = __importDefault(require("axios"));
|
|
31
|
+
// Some imports not used depending on template conditions
|
|
32
|
+
// @ts-ignore
|
|
33
|
+
const common_1 = require("./common");
|
|
34
|
+
// @ts-ignore
|
|
35
|
+
const base_1 = require("./base");
|
|
36
|
+
/**
|
|
37
|
+
* Represents the type of account data stream.
|
|
38
|
+
* @export
|
|
39
|
+
* @enum {string}
|
|
40
|
+
*/
|
|
41
|
+
exports.AccountDataStream = {
|
|
42
|
+
AccountOrderUpdate: 'AccountOrderUpdate',
|
|
43
|
+
AccountTradeUpdate: 'AccountTradeUpdate',
|
|
44
|
+
AccountAggregatedTradeUpdate: 'AccountAggregatedTradeUpdate',
|
|
45
|
+
AccountPositionUpdate: 'AccountPositionUpdate',
|
|
46
|
+
AccountUpdate: 'AccountUpdate',
|
|
47
|
+
AccountTransactionUpdate: 'AccountTransactionUpdate',
|
|
48
|
+
AccountCommandFailureUpdate: 'AccountCommandFailureUpdate'
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* The reason for the account-related event.
|
|
52
|
+
* @export
|
|
53
|
+
* @enum {string}
|
|
54
|
+
*/
|
|
55
|
+
exports.AccountEventReason = {
|
|
56
|
+
Deposit: 'Deposit',
|
|
57
|
+
Withdraw: 'Withdraw',
|
|
58
|
+
OrderCreated: 'OrderCreated',
|
|
59
|
+
OrderMatched: 'OrderMatched',
|
|
60
|
+
OrderCancelled: 'OrderCancelled',
|
|
61
|
+
OrdersForMarketCancelled: 'OrdersForMarketCancelled',
|
|
62
|
+
LeverageUpdated: 'LeverageUpdated',
|
|
63
|
+
IsolatedMarginUpdated: 'IsolatedMarginUpdated',
|
|
64
|
+
FundingRatePayment: 'FundingRatePayment'
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* The type of account-related event.
|
|
68
|
+
* @export
|
|
69
|
+
* @enum {string}
|
|
70
|
+
*/
|
|
71
|
+
exports.AccountEventType = {
|
|
72
|
+
AccountUpdate: 'AccountUpdate',
|
|
73
|
+
AccountTradeUpdate: 'AccountTradeUpdate',
|
|
74
|
+
AccountAggregatedTradeUpdate: 'AccountAggregatedTradeUpdate',
|
|
75
|
+
AccountOrderUpdate: 'AccountOrderUpdate',
|
|
76
|
+
AccountPositionUpdate: 'AccountPositionUpdate',
|
|
77
|
+
AccountTransactionUpdate: 'AccountTransactionUpdate',
|
|
78
|
+
AccountCommandFailureUpdate: 'AccountCommandFailureUpdate'
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* The operation to perform on the margin
|
|
82
|
+
* @export
|
|
83
|
+
* @enum {string}
|
|
84
|
+
*/
|
|
85
|
+
exports.AdjustMarginOperation = {
|
|
86
|
+
Add: 'ADD',
|
|
87
|
+
Subtract: 'SUBTRACT'
|
|
88
|
+
};
|
|
89
|
+
exports.AffiliateIntervalOverviewStatusEnum = {
|
|
90
|
+
Active: 'ACTIVE',
|
|
91
|
+
NotStarted: 'NOT_STARTED',
|
|
92
|
+
Finalized: 'FINALIZED',
|
|
93
|
+
Cooldown: 'COOLDOWN'
|
|
94
|
+
};
|
|
95
|
+
exports.AffiliateMetadataStatusEnum = {
|
|
96
|
+
Pending: 'PENDING',
|
|
97
|
+
Approved: 'APPROVED',
|
|
98
|
+
Rejected: 'REJECTED'
|
|
99
|
+
};
|
|
100
|
+
exports.AffiliateMetadataTierEnum = {
|
|
101
|
+
S: 'S',
|
|
102
|
+
A: 'A',
|
|
103
|
+
N: 'N',
|
|
104
|
+
U: 'U'
|
|
105
|
+
};
|
|
106
|
+
exports.AffiliateOnboardResponseStatusEnum = {
|
|
107
|
+
Approved: 'APPROVED',
|
|
108
|
+
Rejected: 'REJECTED',
|
|
109
|
+
Pending: 'PENDING'
|
|
110
|
+
};
|
|
111
|
+
exports.CampaignMetadataStatusEnum = {
|
|
112
|
+
Active: 'ACTIVE',
|
|
113
|
+
Inactive: 'INACTIVE'
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
*
|
|
117
|
+
* @export
|
|
118
|
+
* @enum {string}
|
|
119
|
+
*/
|
|
120
|
+
exports.CandlePriceType = {
|
|
121
|
+
Last: 'Last',
|
|
122
|
+
Market: 'Market',
|
|
123
|
+
Oracle: 'Oracle',
|
|
124
|
+
Unspecified: 'UNSPECIFIED'
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
*
|
|
128
|
+
* @export
|
|
129
|
+
* @enum {string}
|
|
130
|
+
*/
|
|
131
|
+
exports.CommandFailureReasonCode = {
|
|
132
|
+
Unspecified: 'UNSPECIFIED',
|
|
133
|
+
UnknownAddress: 'UNKNOWN_ADDRESS',
|
|
134
|
+
UnknownSymbol: 'UNKNOWN_SYMBOL',
|
|
135
|
+
NoPosition: 'NO_POSITION',
|
|
136
|
+
InsufficientBalance: 'INSUFFICIENT_BALANCE',
|
|
137
|
+
DuplicateCommandHash: 'DUPLICATE_COMMAND_HASH',
|
|
138
|
+
InvalidLeverage: 'INVALID_LEVERAGE',
|
|
139
|
+
UnknownMarket: 'UNKNOWN_MARKET',
|
|
140
|
+
Unexpected: 'UNEXPECTED'
|
|
141
|
+
};
|
|
142
|
+
exports.ContractsConfigNetworkEnum = {
|
|
143
|
+
Mainnet: 'mainnet',
|
|
144
|
+
Testnet: 'testnet',
|
|
145
|
+
Devnet: 'devnet'
|
|
146
|
+
};
|
|
147
|
+
exports.EpochMetadataStatusEnum = {
|
|
148
|
+
Active: 'ACTIVE',
|
|
149
|
+
NotStarted: 'NOT_STARTED',
|
|
150
|
+
Finalized: 'FINALIZED',
|
|
151
|
+
Cooldown: 'COOLDOWN'
|
|
152
|
+
};
|
|
153
|
+
/**
|
|
154
|
+
*
|
|
155
|
+
* @export
|
|
156
|
+
* @enum {string}
|
|
157
|
+
*/
|
|
158
|
+
exports.FailedCommandType = {
|
|
159
|
+
PositionIsolatedMarginUpdate: 'POSITION_ISOLATED_MARGIN_UPDATE',
|
|
160
|
+
PositionLeverageUpdate: 'POSITION_LEVERAGE_UPDATE',
|
|
161
|
+
Withdraw: 'WITHDRAW'
|
|
162
|
+
};
|
|
163
|
+
exports.IntervalMetadataStatusEnum = {
|
|
164
|
+
Active: 'ACTIVE',
|
|
165
|
+
NotStarted: 'NOT_STARTED',
|
|
166
|
+
Finalized: 'FINALIZED',
|
|
167
|
+
Cooldown: 'COOLDOWN'
|
|
168
|
+
};
|
|
169
|
+
exports.IntervalRewardsStatusEnum = {
|
|
170
|
+
Active: 'ACTIVE',
|
|
171
|
+
NotStarted: 'NOT_STARTED',
|
|
172
|
+
Finalized: 'FINALIZED',
|
|
173
|
+
Cooldown: 'COOLDOWN'
|
|
174
|
+
};
|
|
175
|
+
/**
|
|
176
|
+
*
|
|
177
|
+
* @export
|
|
178
|
+
* @enum {string}
|
|
179
|
+
*/
|
|
180
|
+
exports.KlineInterval = {
|
|
181
|
+
_1m: '1m',
|
|
182
|
+
_3m: '3m',
|
|
183
|
+
_5m: '5m',
|
|
184
|
+
_15m: '15m',
|
|
185
|
+
_30m: '30m',
|
|
186
|
+
_1h: '1h',
|
|
187
|
+
_2h: '2h',
|
|
188
|
+
_4h: '4h',
|
|
189
|
+
_6h: '6h',
|
|
190
|
+
_8h: '8h',
|
|
191
|
+
_12h: '12h',
|
|
192
|
+
_1d: '1d',
|
|
193
|
+
_1w: '1w',
|
|
194
|
+
_1Mo: '1Mo',
|
|
195
|
+
Unspecified: 'UNSPECIFIED'
|
|
196
|
+
};
|
|
197
|
+
/**
|
|
198
|
+
* Margin type.
|
|
199
|
+
* @export
|
|
200
|
+
* @enum {string}
|
|
201
|
+
*/
|
|
202
|
+
exports.MarginType = {
|
|
203
|
+
Cross: 'CROSS',
|
|
204
|
+
Isolated: 'ISOLATED',
|
|
205
|
+
Unspecified: 'UNSPECIFIED'
|
|
206
|
+
};
|
|
207
|
+
exports.MarkPriceUpdateSourceEnum = {
|
|
208
|
+
Mark: 'Mark'
|
|
209
|
+
};
|
|
210
|
+
/**
|
|
211
|
+
*
|
|
212
|
+
* @export
|
|
213
|
+
* @enum {string}
|
|
214
|
+
*/
|
|
215
|
+
exports.MarketDataStreamName = {
|
|
216
|
+
RecentTrade: 'Recent_Trade',
|
|
217
|
+
Ticker: 'Ticker',
|
|
218
|
+
TickerAll: 'Ticker_All',
|
|
219
|
+
DiffDepth10Ms: 'Diff_Depth_10_ms',
|
|
220
|
+
DiffDepth200Ms: 'Diff_Depth_200_ms',
|
|
221
|
+
DiffDepth500Ms: 'Diff_Depth_500_ms',
|
|
222
|
+
PartialDepth5: 'Partial_Depth_5',
|
|
223
|
+
PartialDepth10: 'Partial_Depth_10',
|
|
224
|
+
PartialDepth20: 'Partial_Depth_20',
|
|
225
|
+
OraclePrice: 'Oracle_Price',
|
|
226
|
+
MarkPrice: 'Mark_Price',
|
|
227
|
+
MarketPrice: 'Market_Price',
|
|
228
|
+
Candlestick1mLast: 'Candlestick_1m_Last',
|
|
229
|
+
Candlestick3mLast: 'Candlestick_3m_Last',
|
|
230
|
+
Candlestick5mLast: 'Candlestick_5m_Last',
|
|
231
|
+
Candlestick15mLast: 'Candlestick_15m_Last',
|
|
232
|
+
Candlestick30mLast: 'Candlestick_30m_Last',
|
|
233
|
+
Candlestick1hLast: 'Candlestick_1h_Last',
|
|
234
|
+
Candlestick2hLast: 'Candlestick_2h_Last',
|
|
235
|
+
Candlestick4hLast: 'Candlestick_4h_Last',
|
|
236
|
+
Candlestick6hLast: 'Candlestick_6h_Last',
|
|
237
|
+
Candlestick8hLast: 'Candlestick_8h_Last',
|
|
238
|
+
Candlestick12hLast: 'Candlestick_12h_Last',
|
|
239
|
+
Candlestick1dLast: 'Candlestick_1d_Last',
|
|
240
|
+
Candlestick1wLast: 'Candlestick_1w_Last',
|
|
241
|
+
Candlestick1MoLast: 'Candlestick_1Mo_Last',
|
|
242
|
+
Candlestick1mOracle: 'Candlestick_1m_Oracle',
|
|
243
|
+
Candlestick3mOracle: 'Candlestick_3m_Oracle',
|
|
244
|
+
Candlestick5mOracle: 'Candlestick_5m_Oracle',
|
|
245
|
+
Candlestick15mOracle: 'Candlestick_15m_Oracle',
|
|
246
|
+
Candlestick30mOracle: 'Candlestick_30m_Oracle',
|
|
247
|
+
Candlestick1hOracle: 'Candlestick_1h_Oracle',
|
|
248
|
+
Candlestick2hOracle: 'Candlestick_2h_Oracle',
|
|
249
|
+
Candlestick4hOracle: 'Candlestick_4h_Oracle',
|
|
250
|
+
Candlestick6hOracle: 'Candlestick_6h_Oracle',
|
|
251
|
+
Candlestick8hOracle: 'Candlestick_8h_Oracle',
|
|
252
|
+
Candlestick12hOracle: 'Candlestick_12h_Oracle',
|
|
253
|
+
Candlestick1dOracle: 'Candlestick_1d_Oracle',
|
|
254
|
+
Candlestick1wOracle: 'Candlestick_1w_Oracle',
|
|
255
|
+
Candlestick1MoOracle: 'Candlestick_1Mo_Oracle',
|
|
256
|
+
Candlestick1mMark: 'Candlestick_1m_Mark',
|
|
257
|
+
Candlestick3mMark: 'Candlestick_3m_Mark',
|
|
258
|
+
Candlestick5mMark: 'Candlestick_5m_Mark',
|
|
259
|
+
Candlestick15mMark: 'Candlestick_15m_Mark',
|
|
260
|
+
Candlestick30mMark: 'Candlestick_30m_Mark',
|
|
261
|
+
Candlestick1hMark: 'Candlestick_1h_Mark',
|
|
262
|
+
Candlestick2hMark: 'Candlestick_2h_Mark',
|
|
263
|
+
Candlestick4hMark: 'Candlestick_4h_Mark',
|
|
264
|
+
Candlestick6hMark: 'Candlestick_6h_Mark',
|
|
265
|
+
Candlestick8hMark: 'Candlestick_8h_Mark',
|
|
266
|
+
Candlestick12hMark: 'Candlestick_12h_Mark',
|
|
267
|
+
Candlestick1dMark: 'Candlestick_1d_Mark',
|
|
268
|
+
Candlestick1wMark: 'Candlestick_1w_Mark',
|
|
269
|
+
Candlestick1MoMark: 'Candlestick_1Mo_Mark',
|
|
270
|
+
Candlestick1mMarket: 'Candlestick_1m_Market',
|
|
271
|
+
Candlestick3mMarket: 'Candlestick_3m_Market',
|
|
272
|
+
Candlestick5mMarket: 'Candlestick_5m_Market',
|
|
273
|
+
Candlestick15mMarket: 'Candlestick_15m_Market',
|
|
274
|
+
Candlestick30mMarket: 'Candlestick_30m_Market',
|
|
275
|
+
Candlestick1hMarket: 'Candlestick_1h_Market',
|
|
276
|
+
Candlestick2hMarket: 'Candlestick_2h_Market',
|
|
277
|
+
Candlestick4hMarket: 'Candlestick_4h_Market',
|
|
278
|
+
Candlestick6hMarket: 'Candlestick_6h_Market',
|
|
279
|
+
Candlestick8hMarket: 'Candlestick_8h_Market',
|
|
280
|
+
Candlestick12hMarket: 'Candlestick_12h_Market',
|
|
281
|
+
Candlestick1dMarket: 'Candlestick_1d_Market',
|
|
282
|
+
Candlestick1wMarket: 'Candlestick_1w_Market',
|
|
283
|
+
Candlestick1MoMarket: 'Candlestick_1Mo_Market'
|
|
284
|
+
};
|
|
285
|
+
/**
|
|
286
|
+
* The type of event communicated in the WebSocket message.
|
|
287
|
+
* @export
|
|
288
|
+
* @enum {string}
|
|
289
|
+
*/
|
|
290
|
+
exports.MarketEventType = {
|
|
291
|
+
RecentTradesUpdates: 'RecentTradesUpdates',
|
|
292
|
+
TickerUpdate: 'TickerUpdate',
|
|
293
|
+
TickerAllUpdate: 'TickerAllUpdate',
|
|
294
|
+
OraclePriceUpdate: 'OraclePriceUpdate',
|
|
295
|
+
MarkPriceUpdate: 'MarkPriceUpdate',
|
|
296
|
+
MarketPriceUpdate: 'MarketPriceUpdate',
|
|
297
|
+
CandlestickUpdate: 'CandlestickUpdate',
|
|
298
|
+
OrderbookDiffDepthUpdate: 'OrderbookDiffDepthUpdate',
|
|
299
|
+
OrderbookPartialDepthUpdate: 'OrderbookPartialDepthUpdate'
|
|
300
|
+
};
|
|
301
|
+
exports.MarketPriceUpdateSourceEnum = {
|
|
302
|
+
Market: 'Market'
|
|
303
|
+
};
|
|
304
|
+
/**
|
|
305
|
+
*
|
|
306
|
+
* @export
|
|
307
|
+
* @enum {string}
|
|
308
|
+
*/
|
|
309
|
+
exports.MarketStatus = {
|
|
310
|
+
Active: 'ACTIVE',
|
|
311
|
+
Beta: 'BETA',
|
|
312
|
+
Maintenance: 'MAINTENANCE',
|
|
313
|
+
Delisted: 'DELISTED',
|
|
314
|
+
Unspecified: 'UNSPECIFIED'
|
|
315
|
+
};
|
|
316
|
+
exports.OraclePriceUpdateSourceEnum = {
|
|
317
|
+
Oracle: 'Oracle'
|
|
318
|
+
};
|
|
319
|
+
/**
|
|
320
|
+
* The reason for an order cancellation.
|
|
321
|
+
* @export
|
|
322
|
+
* @enum {string}
|
|
323
|
+
*/
|
|
324
|
+
exports.OrderCancelReason = {
|
|
325
|
+
Unspecified: 'UNSPECIFIED',
|
|
326
|
+
InsufficientMargin: 'INSUFFICIENT_MARGIN',
|
|
327
|
+
DuplicateOrder: 'DUPLICATE_ORDER',
|
|
328
|
+
PostOnlyWouldTrade: 'POST_ONLY_WOULD_TRADE',
|
|
329
|
+
InvalidSymbol: 'INVALID_SYMBOL',
|
|
330
|
+
SignedAtTooOld: 'SIGNED_AT_TOO_OLD',
|
|
331
|
+
OrderExpired: 'ORDER_EXPIRED',
|
|
332
|
+
InvalidLeverage: 'INVALID_LEVERAGE',
|
|
333
|
+
InvalidInput: 'INVALID_INPUT',
|
|
334
|
+
PriceOutOfBound: 'PRICE_OUT_OF_BOUND',
|
|
335
|
+
QuantityOutOfBound: 'QUANTITY_OUT_OF_BOUND',
|
|
336
|
+
PriceOutOfTickSize: 'PRICE_OUT_OF_TICK_SIZE',
|
|
337
|
+
QuantityOutOfStepSize: 'QUANTITY_OUT_OF_STEP_SIZE',
|
|
338
|
+
ReduceOnlyWouldOpen: 'REDUCE_ONLY_WOULD_OPEN',
|
|
339
|
+
TooManyOpenOrdersOnMarket: 'TOO_MANY_OPEN_ORDERS_ON_MARKET',
|
|
340
|
+
UserCancelled: 'USER_CANCELLED',
|
|
341
|
+
UserCancelledAllOnMarket: 'USER_CANCELLED_ALL_ON_MARKET',
|
|
342
|
+
SelfTradePrevention: 'SELF_TRADE_PREVENTION',
|
|
343
|
+
LeverageUpdate: 'LEVERAGE_UPDATE',
|
|
344
|
+
AccountNotFound: 'ACCOUNT_NOT_FOUND',
|
|
345
|
+
MarketNotTrading: 'MARKET_NOT_TRADING',
|
|
346
|
+
InsufficientLiquidity: 'INSUFFICIENT_LIQUIDITY',
|
|
347
|
+
PositionNotFound: 'POSITION_NOT_FOUND',
|
|
348
|
+
LiquidationOutOfOrder: 'LIQUIDATION_OUT_OF_ORDER',
|
|
349
|
+
AccountNotLiquidatable: 'ACCOUNT_NOT_LIQUIDATABLE',
|
|
350
|
+
OrderNotReducingPosition: 'ORDER_NOT_REDUCING_POSITION',
|
|
351
|
+
UserCancelledAllStandbyOnMarket: 'USER_CANCELLED_ALL_STANDBY_ON_MARKET',
|
|
352
|
+
PositionExceedsMaxOpenInterest: 'POSITION_EXCEEDS_MAX_OPEN_INTEREST',
|
|
353
|
+
AccountDeauthorized: 'ACCOUNT_DEAUTHORIZED'
|
|
354
|
+
};
|
|
355
|
+
/**
|
|
356
|
+
* The reason for failure to cancel an order.
|
|
357
|
+
* @export
|
|
358
|
+
* @enum {string}
|
|
359
|
+
*/
|
|
360
|
+
exports.OrderCancellationFailureReason = {
|
|
361
|
+
OrderNotFound: 'ORDER_NOT_FOUND',
|
|
362
|
+
MarketNotFound: 'MARKET_NOT_FOUND',
|
|
363
|
+
AccountNotFound: 'ACCOUNT_NOT_FOUND',
|
|
364
|
+
NoOpenOrdersOnMarket: 'NO_OPEN_ORDERS_ON_MARKET',
|
|
365
|
+
NoFailure: 'NO_FAILURE',
|
|
366
|
+
Unspecified: 'UNSPECIFIED'
|
|
367
|
+
};
|
|
368
|
+
/**
|
|
369
|
+
* Side of the order
|
|
370
|
+
* @export
|
|
371
|
+
* @enum {string}
|
|
372
|
+
*/
|
|
373
|
+
exports.OrderSide = {
|
|
374
|
+
Long: 'LONG',
|
|
375
|
+
Short: 'SHORT',
|
|
376
|
+
Unspecified: 'UNSPECIFIED'
|
|
377
|
+
};
|
|
378
|
+
/**
|
|
379
|
+
* The current status of the order.
|
|
380
|
+
* @export
|
|
381
|
+
* @enum {string}
|
|
382
|
+
*/
|
|
383
|
+
exports.OrderStatus = {
|
|
384
|
+
Standby: 'STANDBY',
|
|
385
|
+
Open: 'OPEN',
|
|
386
|
+
PartiallyFilledOpen: 'PARTIALLY_FILLED_OPEN',
|
|
387
|
+
PartiallyFilledCanceled: 'PARTIALLY_FILLED_CANCELED',
|
|
388
|
+
Filled: 'FILLED',
|
|
389
|
+
Cancelled: 'CANCELLED',
|
|
390
|
+
Expired: 'EXPIRED',
|
|
391
|
+
PartiallyFilledExpired: 'PARTIALLY_FILLED_EXPIRED',
|
|
392
|
+
Unspecified: 'UNSPECIFIED'
|
|
393
|
+
};
|
|
394
|
+
/**
|
|
395
|
+
* The time-in-force policy for the order. By default, all orders are GTT. UNSPECIFIED is set to default. GTT: Good Til Time IOC: Immediate Or Cancel FOK: Fill Or Kill
|
|
396
|
+
* @export
|
|
397
|
+
* @enum {string}
|
|
398
|
+
*/
|
|
399
|
+
exports.OrderTimeInForce = {
|
|
400
|
+
Gtt: 'GTT',
|
|
401
|
+
Ioc: 'IOC',
|
|
402
|
+
Fok: 'FOK',
|
|
403
|
+
Unspecified: 'UNSPECIFIED'
|
|
404
|
+
};
|
|
405
|
+
/**
|
|
406
|
+
* The type of order. (BANKRUPTCY_LIQUIDATION is deprecated)
|
|
407
|
+
* @export
|
|
408
|
+
* @enum {string}
|
|
409
|
+
*/
|
|
410
|
+
exports.OrderType = {
|
|
411
|
+
Limit: 'LIMIT',
|
|
412
|
+
Market: 'MARKET',
|
|
413
|
+
StopLimit: 'STOP_LIMIT',
|
|
414
|
+
StopMarket: 'STOP_MARKET',
|
|
415
|
+
Liquidation: 'LIQUIDATION',
|
|
416
|
+
StopLossMarket: 'STOP_LOSS_MARKET',
|
|
417
|
+
TakeProfitMarket: 'TAKE_PROFIT_MARKET',
|
|
418
|
+
StopLossLimit: 'STOP_LOSS_LIMIT',
|
|
419
|
+
TakeProfitLimit: 'TAKE_PROFIT_LIMIT',
|
|
420
|
+
BankruptcyLiquidation: 'BANKRUPTCY_LIQUIDATION',
|
|
421
|
+
Unspecified: 'UNSPECIFIED'
|
|
422
|
+
};
|
|
423
|
+
exports.OrderbookPartialDepthUpdateDepthLevelEnum = {
|
|
424
|
+
_5: '5',
|
|
425
|
+
_10: '10',
|
|
426
|
+
_20: '20'
|
|
427
|
+
};
|
|
428
|
+
/**
|
|
429
|
+
* The side of the position, either long or short
|
|
430
|
+
* @export
|
|
431
|
+
* @enum {string}
|
|
432
|
+
*/
|
|
433
|
+
exports.PositionSide = {
|
|
434
|
+
Long: 'LONG',
|
|
435
|
+
Short: 'SHORT',
|
|
436
|
+
Unspecified: 'UNSPECIFIED'
|
|
437
|
+
};
|
|
438
|
+
/**
|
|
439
|
+
* The strategy used to resolve self trades. TAKER: On a self trade, the taker order will be cancelled MAKER: On a self trade, the maker order will be cancelled BOTH: On a self trade, both the taker and the maker order will be cancelled UNSPECIFIED: set to default value
|
|
440
|
+
* @export
|
|
441
|
+
* @enum {string}
|
|
442
|
+
*/
|
|
443
|
+
exports.SelfTradePreventionType = {
|
|
444
|
+
Taker: 'TAKER',
|
|
445
|
+
Maker: 'MAKER',
|
|
446
|
+
Both: 'BOTH',
|
|
447
|
+
Unspecified: 'UNSPECIFIED'
|
|
448
|
+
};
|
|
449
|
+
/**
|
|
450
|
+
*
|
|
451
|
+
* @export
|
|
452
|
+
* @enum {string}
|
|
453
|
+
*/
|
|
454
|
+
exports.StatsInterval = {
|
|
455
|
+
_1d: '1d',
|
|
456
|
+
_1w: '1w',
|
|
457
|
+
_1Mo: '1Mo',
|
|
458
|
+
Unspecified: 'UNSPECIFIED'
|
|
459
|
+
};
|
|
460
|
+
/**
|
|
461
|
+
* Indicates the type of subscription action.
|
|
462
|
+
* @export
|
|
463
|
+
* @enum {string}
|
|
464
|
+
*/
|
|
465
|
+
exports.SubscriptionType = {
|
|
466
|
+
Subscribe: 'Subscribe',
|
|
467
|
+
Unsubscribe: 'Unsubscribe'
|
|
468
|
+
};
|
|
469
|
+
/**
|
|
470
|
+
* Trade side based on the user order in this trade.
|
|
471
|
+
* @export
|
|
472
|
+
* @enum {string}
|
|
473
|
+
*/
|
|
474
|
+
exports.TradeSide = {
|
|
475
|
+
Long: 'LONG',
|
|
476
|
+
Short: 'SHORT',
|
|
477
|
+
Unspecified: 'UNSPECIFIED'
|
|
478
|
+
};
|
|
479
|
+
/**
|
|
480
|
+
* Type of trade.
|
|
481
|
+
* @export
|
|
482
|
+
* @enum {string}
|
|
483
|
+
*/
|
|
484
|
+
exports.TradeType = {
|
|
485
|
+
Order: 'ORDER',
|
|
486
|
+
Liquidation: 'LIQUIDATION',
|
|
487
|
+
Deleverage: 'DELEVERAGE',
|
|
488
|
+
Unspecified: 'UNSPECIFIED'
|
|
489
|
+
};
|
|
490
|
+
/**
|
|
491
|
+
* Transaction type (what caused the change in the asset balance).
|
|
492
|
+
* @export
|
|
493
|
+
* @enum {string}
|
|
494
|
+
*/
|
|
495
|
+
exports.TransactionType = {
|
|
496
|
+
Transfer: 'TRANSFER',
|
|
497
|
+
Deposit: 'DEPOSIT',
|
|
498
|
+
Withdraw: 'WITHDRAW',
|
|
499
|
+
RealizedPnl: 'REALIZED_PNL',
|
|
500
|
+
FundingFee: 'FUNDING_FEE',
|
|
501
|
+
TradingFee: 'TRADING_FEE',
|
|
502
|
+
TradingGasFee: 'TRADING_GAS_FEE',
|
|
503
|
+
Bonus: 'BONUS',
|
|
504
|
+
Unspecified: 'UNSPECIFIED'
|
|
505
|
+
};
|
|
506
|
+
exports.UserCampaignRewardsStatusEnum = {
|
|
507
|
+
Active: 'ACTIVE',
|
|
508
|
+
NotStarted: 'NOT_STARTED',
|
|
509
|
+
Finalized: 'FINALIZED',
|
|
510
|
+
Cooldown: 'COOLDOWN'
|
|
511
|
+
};
|
|
512
|
+
/**
|
|
513
|
+
* AccountDataApi - axios parameter creator
|
|
514
|
+
* @export
|
|
515
|
+
*/
|
|
516
|
+
const AccountDataApiAxiosParamCreator = function (configuration) {
|
|
517
|
+
return {
|
|
518
|
+
/**
|
|
519
|
+
* Retrieves the user\'s account details.
|
|
520
|
+
* @summary /account
|
|
521
|
+
* @param {string} [accountAddress] Account address to fetch account details by.
|
|
522
|
+
* @param {*} [options] Override http request option.
|
|
523
|
+
* @throws {RequiredError}
|
|
524
|
+
*/
|
|
525
|
+
getAccountDetails: (accountAddress_1, ...args_1) => __awaiter(this, [accountAddress_1, ...args_1], void 0, function* (accountAddress, options = {}) {
|
|
526
|
+
const localVarPath = `/api/v1/account`;
|
|
527
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
528
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
529
|
+
let baseOptions;
|
|
530
|
+
if (configuration) {
|
|
531
|
+
baseOptions = configuration.baseOptions;
|
|
532
|
+
}
|
|
533
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
534
|
+
const localVarHeaderParameter = {};
|
|
535
|
+
const localVarQueryParameter = {};
|
|
536
|
+
if (accountAddress !== undefined) {
|
|
537
|
+
localVarQueryParameter['accountAddress'] = accountAddress;
|
|
538
|
+
}
|
|
539
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
540
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
541
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
542
|
+
return {
|
|
543
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
544
|
+
options: localVarRequestOptions,
|
|
545
|
+
};
|
|
546
|
+
}),
|
|
547
|
+
/**
|
|
548
|
+
* Retrieves the funding rate history for a specific account.
|
|
549
|
+
* @summary /account/fundingRateHistory
|
|
550
|
+
* @param {string} [accountAddress] Account address to filter funding rate history by.
|
|
551
|
+
* @param {number} [limit] Default 500; max 1000.
|
|
552
|
+
* @param {number} [page] The page number to retrieve in a paginated response.
|
|
553
|
+
* @param {*} [options] Override http request option.
|
|
554
|
+
* @throws {RequiredError}
|
|
555
|
+
*/
|
|
556
|
+
getAccountFundingRateHistory: (accountAddress_1, limit_1, page_1, ...args_1) => __awaiter(this, [accountAddress_1, limit_1, page_1, ...args_1], void 0, function* (accountAddress, limit, page, options = {}) {
|
|
557
|
+
const localVarPath = `/api/v1/account/fundingRateHistory`;
|
|
558
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
559
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
560
|
+
let baseOptions;
|
|
561
|
+
if (configuration) {
|
|
562
|
+
baseOptions = configuration.baseOptions;
|
|
563
|
+
}
|
|
564
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
565
|
+
const localVarHeaderParameter = {};
|
|
566
|
+
const localVarQueryParameter = {};
|
|
567
|
+
// authentication bearerAuth required
|
|
568
|
+
// http bearer authentication required
|
|
569
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
570
|
+
if (accountAddress !== undefined) {
|
|
571
|
+
localVarQueryParameter['accountAddress'] = accountAddress;
|
|
572
|
+
}
|
|
573
|
+
if (limit !== undefined) {
|
|
574
|
+
localVarQueryParameter['limit'] = limit;
|
|
575
|
+
}
|
|
576
|
+
if (page !== undefined) {
|
|
577
|
+
localVarQueryParameter['page'] = page;
|
|
578
|
+
}
|
|
579
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
580
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
581
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
582
|
+
return {
|
|
583
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
584
|
+
options: localVarRequestOptions,
|
|
585
|
+
};
|
|
586
|
+
}),
|
|
587
|
+
/**
|
|
588
|
+
* Retrieves the user\'s account preferences.
|
|
589
|
+
* @summary /account/preferences
|
|
590
|
+
* @param {*} [options] Override http request option.
|
|
591
|
+
* @throws {RequiredError}
|
|
592
|
+
*/
|
|
593
|
+
getAccountPreferences: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
594
|
+
const localVarPath = `/api/v1/account/preferences`;
|
|
595
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
596
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
597
|
+
let baseOptions;
|
|
598
|
+
if (configuration) {
|
|
599
|
+
baseOptions = configuration.baseOptions;
|
|
600
|
+
}
|
|
601
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
602
|
+
const localVarHeaderParameter = {};
|
|
603
|
+
const localVarQueryParameter = {};
|
|
604
|
+
// authentication bearerAuth required
|
|
605
|
+
// http bearer authentication required
|
|
606
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
607
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
608
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
609
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
610
|
+
return {
|
|
611
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
612
|
+
options: localVarRequestOptions,
|
|
613
|
+
};
|
|
614
|
+
}),
|
|
615
|
+
/**
|
|
616
|
+
* Retrieves the user\'s trade history.
|
|
617
|
+
* @summary /account/trades
|
|
618
|
+
* @param {string} [symbol] Market address to filter trades by. If not specified, returns trades for all markets.
|
|
619
|
+
* @param {number} [startTimeAtMillis] Start time in milliseconds. Defaults to 7 days ago if not specified.
|
|
620
|
+
* @param {number} [endTimeAtMillis] End time in milliseconds. Defaults to now if not specified. Must be greater than start time and must be less than 7 days apart.
|
|
621
|
+
* @param {number} [limit] Default 500; max 1000.
|
|
622
|
+
* @param {TradeType} [tradeType] Type of trade. By default returns all. UNSPECIFIED returns all.
|
|
623
|
+
* @param {number} [page] The page number to retrieve in a paginated response.
|
|
624
|
+
* @param {*} [options] Override http request option.
|
|
625
|
+
* @throws {RequiredError}
|
|
626
|
+
*/
|
|
627
|
+
getAccountTrades: (symbol_1, startTimeAtMillis_1, endTimeAtMillis_1, limit_1, tradeType_1, page_1, ...args_1) => __awaiter(this, [symbol_1, startTimeAtMillis_1, endTimeAtMillis_1, limit_1, tradeType_1, page_1, ...args_1], void 0, function* (symbol, startTimeAtMillis, endTimeAtMillis, limit, tradeType, page, options = {}) {
|
|
628
|
+
const localVarPath = `/api/v1/account/trades`;
|
|
629
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
630
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
631
|
+
let baseOptions;
|
|
632
|
+
if (configuration) {
|
|
633
|
+
baseOptions = configuration.baseOptions;
|
|
634
|
+
}
|
|
635
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
636
|
+
const localVarHeaderParameter = {};
|
|
637
|
+
const localVarQueryParameter = {};
|
|
638
|
+
// authentication bearerAuth required
|
|
639
|
+
// http bearer authentication required
|
|
640
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
641
|
+
if (symbol !== undefined) {
|
|
642
|
+
localVarQueryParameter['symbol'] = symbol;
|
|
643
|
+
}
|
|
644
|
+
if (startTimeAtMillis !== undefined) {
|
|
645
|
+
localVarQueryParameter['startTimeAtMillis'] = startTimeAtMillis;
|
|
646
|
+
}
|
|
647
|
+
if (endTimeAtMillis !== undefined) {
|
|
648
|
+
localVarQueryParameter['endTimeAtMillis'] = endTimeAtMillis;
|
|
649
|
+
}
|
|
650
|
+
if (limit !== undefined) {
|
|
651
|
+
localVarQueryParameter['limit'] = limit;
|
|
652
|
+
}
|
|
653
|
+
if (tradeType !== undefined) {
|
|
654
|
+
localVarQueryParameter['tradeType'] = tradeType;
|
|
655
|
+
}
|
|
656
|
+
if (page !== undefined) {
|
|
657
|
+
localVarQueryParameter['page'] = page;
|
|
658
|
+
}
|
|
659
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
660
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
661
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
662
|
+
return {
|
|
663
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
664
|
+
options: localVarRequestOptions,
|
|
665
|
+
};
|
|
666
|
+
}),
|
|
667
|
+
/**
|
|
668
|
+
* Retrieves the user\'s transaction history (any change in balance).
|
|
669
|
+
* @summary /account/transactions
|
|
670
|
+
* @param {Array<TransactionType>} [types] Optional query parameter to filter transactions by type.
|
|
671
|
+
* @param {string} [assetSymbol] Optional query parameter to filter transactions by asset bank address.
|
|
672
|
+
* @param {number} [startTimeAtMillis] Start time in milliseconds. Defaults to 7 days ago if not specified.
|
|
673
|
+
* @param {number} [endTimeAtMillis] End time in milliseconds. Defaults to now if not specified. Must be greater than start time and must be less than 7 days apart.
|
|
674
|
+
* @param {number} [limit] Default 500; max 1000.
|
|
675
|
+
* @param {number} [page] The page number to retrieve in a paginated response.
|
|
676
|
+
* @param {*} [options] Override http request option.
|
|
677
|
+
* @throws {RequiredError}
|
|
678
|
+
*/
|
|
679
|
+
getAccountTransactionHistory: (types_1, assetSymbol_1, startTimeAtMillis_1, endTimeAtMillis_1, limit_1, page_1, ...args_1) => __awaiter(this, [types_1, assetSymbol_1, startTimeAtMillis_1, endTimeAtMillis_1, limit_1, page_1, ...args_1], void 0, function* (types, assetSymbol, startTimeAtMillis, endTimeAtMillis, limit, page, options = {}) {
|
|
680
|
+
const localVarPath = `/api/v1/account/transactions`;
|
|
681
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
682
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
683
|
+
let baseOptions;
|
|
684
|
+
if (configuration) {
|
|
685
|
+
baseOptions = configuration.baseOptions;
|
|
686
|
+
}
|
|
687
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
688
|
+
const localVarHeaderParameter = {};
|
|
689
|
+
const localVarQueryParameter = {};
|
|
690
|
+
// authentication bearerAuth required
|
|
691
|
+
// http bearer authentication required
|
|
692
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
693
|
+
if (types) {
|
|
694
|
+
localVarQueryParameter['types'] = types;
|
|
695
|
+
}
|
|
696
|
+
if (assetSymbol !== undefined) {
|
|
697
|
+
localVarQueryParameter['assetSymbol'] = assetSymbol;
|
|
698
|
+
}
|
|
699
|
+
if (startTimeAtMillis !== undefined) {
|
|
700
|
+
localVarQueryParameter['startTimeAtMillis'] = startTimeAtMillis;
|
|
701
|
+
}
|
|
702
|
+
if (endTimeAtMillis !== undefined) {
|
|
703
|
+
localVarQueryParameter['endTimeAtMillis'] = endTimeAtMillis;
|
|
704
|
+
}
|
|
705
|
+
if (limit !== undefined) {
|
|
706
|
+
localVarQueryParameter['limit'] = limit;
|
|
707
|
+
}
|
|
708
|
+
if (page !== undefined) {
|
|
709
|
+
localVarQueryParameter['page'] = page;
|
|
710
|
+
}
|
|
711
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
712
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
713
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
714
|
+
return {
|
|
715
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
716
|
+
options: localVarRequestOptions,
|
|
717
|
+
};
|
|
718
|
+
}),
|
|
719
|
+
/**
|
|
720
|
+
* Update user\'s account preferences. This will overwrite the preferences, so always send the full object.
|
|
721
|
+
* @summary /account/preferences
|
|
722
|
+
* @param {UpdateAccountPreferenceRequest} updateAccountPreferenceRequest
|
|
723
|
+
* @param {*} [options] Override http request option.
|
|
724
|
+
* @throws {RequiredError}
|
|
725
|
+
*/
|
|
726
|
+
putAccountPreferences: (updateAccountPreferenceRequest_1, ...args_1) => __awaiter(this, [updateAccountPreferenceRequest_1, ...args_1], void 0, function* (updateAccountPreferenceRequest, options = {}) {
|
|
727
|
+
// verify required parameter 'updateAccountPreferenceRequest' is not null or undefined
|
|
728
|
+
(0, common_1.assertParamExists)('putAccountPreferences', 'updateAccountPreferenceRequest', updateAccountPreferenceRequest);
|
|
729
|
+
const localVarPath = `/api/v1/account/preferences`;
|
|
730
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
731
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
732
|
+
let baseOptions;
|
|
733
|
+
if (configuration) {
|
|
734
|
+
baseOptions = configuration.baseOptions;
|
|
735
|
+
}
|
|
736
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
|
|
737
|
+
const localVarHeaderParameter = {};
|
|
738
|
+
const localVarQueryParameter = {};
|
|
739
|
+
// authentication bearerAuth required
|
|
740
|
+
// http bearer authentication required
|
|
741
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
742
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
743
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
744
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
745
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
746
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateAccountPreferenceRequest, localVarRequestOptions, configuration);
|
|
747
|
+
return {
|
|
748
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
749
|
+
options: localVarRequestOptions,
|
|
750
|
+
};
|
|
751
|
+
}),
|
|
752
|
+
/**
|
|
753
|
+
* Sponsors a transaction if it\'s eligible for sponsorship based on allowlisted methods and kinds.
|
|
754
|
+
* @summary /account/sponsorTx
|
|
755
|
+
* @param {SponsorTxRequest} sponsorTxRequest
|
|
756
|
+
* @param {*} [options] Override http request option.
|
|
757
|
+
* @throws {RequiredError}
|
|
758
|
+
*/
|
|
759
|
+
sponsorTx: (sponsorTxRequest_1, ...args_1) => __awaiter(this, [sponsorTxRequest_1, ...args_1], void 0, function* (sponsorTxRequest, options = {}) {
|
|
760
|
+
// verify required parameter 'sponsorTxRequest' is not null or undefined
|
|
761
|
+
(0, common_1.assertParamExists)('sponsorTx', 'sponsorTxRequest', sponsorTxRequest);
|
|
762
|
+
const localVarPath = `/api/v1/account/sponsorTx`;
|
|
763
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
764
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
765
|
+
let baseOptions;
|
|
766
|
+
if (configuration) {
|
|
767
|
+
baseOptions = configuration.baseOptions;
|
|
768
|
+
}
|
|
769
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
770
|
+
const localVarHeaderParameter = {};
|
|
771
|
+
const localVarQueryParameter = {};
|
|
772
|
+
// authentication bearerAuth required
|
|
773
|
+
// http bearer authentication required
|
|
774
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
775
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
776
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
777
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
778
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
779
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(sponsorTxRequest, localVarRequestOptions, configuration);
|
|
780
|
+
return {
|
|
781
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
782
|
+
options: localVarRequestOptions,
|
|
783
|
+
};
|
|
784
|
+
}),
|
|
785
|
+
};
|
|
786
|
+
};
|
|
787
|
+
exports.AccountDataApiAxiosParamCreator = AccountDataApiAxiosParamCreator;
|
|
788
|
+
/**
|
|
789
|
+
* AccountDataApi - functional programming interface
|
|
790
|
+
* @export
|
|
791
|
+
*/
|
|
792
|
+
const AccountDataApiFp = function (configuration) {
|
|
793
|
+
const localVarAxiosParamCreator = (0, exports.AccountDataApiAxiosParamCreator)(configuration);
|
|
794
|
+
return {
|
|
795
|
+
/**
|
|
796
|
+
* Retrieves the user\'s account details.
|
|
797
|
+
* @summary /account
|
|
798
|
+
* @param {string} [accountAddress] Account address to fetch account details by.
|
|
799
|
+
* @param {*} [options] Override http request option.
|
|
800
|
+
* @throws {RequiredError}
|
|
801
|
+
*/
|
|
802
|
+
getAccountDetails(accountAddress, options) {
|
|
803
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
804
|
+
var _a, _b, _c;
|
|
805
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAccountDetails(accountAddress, options);
|
|
806
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
807
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AccountDataApi.getAccountDetails']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
808
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
809
|
+
});
|
|
810
|
+
},
|
|
811
|
+
/**
|
|
812
|
+
* Retrieves the funding rate history for a specific account.
|
|
813
|
+
* @summary /account/fundingRateHistory
|
|
814
|
+
* @param {string} [accountAddress] Account address to filter funding rate history by.
|
|
815
|
+
* @param {number} [limit] Default 500; max 1000.
|
|
816
|
+
* @param {number} [page] The page number to retrieve in a paginated response.
|
|
817
|
+
* @param {*} [options] Override http request option.
|
|
818
|
+
* @throws {RequiredError}
|
|
819
|
+
*/
|
|
820
|
+
getAccountFundingRateHistory(accountAddress, limit, page, options) {
|
|
821
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
822
|
+
var _a, _b, _c;
|
|
823
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAccountFundingRateHistory(accountAddress, limit, page, options);
|
|
824
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
825
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AccountDataApi.getAccountFundingRateHistory']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
826
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
827
|
+
});
|
|
828
|
+
},
|
|
829
|
+
/**
|
|
830
|
+
* Retrieves the user\'s account preferences.
|
|
831
|
+
* @summary /account/preferences
|
|
832
|
+
* @param {*} [options] Override http request option.
|
|
833
|
+
* @throws {RequiredError}
|
|
834
|
+
*/
|
|
835
|
+
getAccountPreferences(options) {
|
|
836
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
837
|
+
var _a, _b, _c;
|
|
838
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAccountPreferences(options);
|
|
839
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
840
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AccountDataApi.getAccountPreferences']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
841
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
842
|
+
});
|
|
843
|
+
},
|
|
844
|
+
/**
|
|
845
|
+
* Retrieves the user\'s trade history.
|
|
846
|
+
* @summary /account/trades
|
|
847
|
+
* @param {string} [symbol] Market address to filter trades by. If not specified, returns trades for all markets.
|
|
848
|
+
* @param {number} [startTimeAtMillis] Start time in milliseconds. Defaults to 7 days ago if not specified.
|
|
849
|
+
* @param {number} [endTimeAtMillis] End time in milliseconds. Defaults to now if not specified. Must be greater than start time and must be less than 7 days apart.
|
|
850
|
+
* @param {number} [limit] Default 500; max 1000.
|
|
851
|
+
* @param {TradeType} [tradeType] Type of trade. By default returns all. UNSPECIFIED returns all.
|
|
852
|
+
* @param {number} [page] The page number to retrieve in a paginated response.
|
|
853
|
+
* @param {*} [options] Override http request option.
|
|
854
|
+
* @throws {RequiredError}
|
|
855
|
+
*/
|
|
856
|
+
getAccountTrades(symbol, startTimeAtMillis, endTimeAtMillis, limit, tradeType, page, options) {
|
|
857
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
858
|
+
var _a, _b, _c;
|
|
859
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAccountTrades(symbol, startTimeAtMillis, endTimeAtMillis, limit, tradeType, page, options);
|
|
860
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
861
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AccountDataApi.getAccountTrades']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
862
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
863
|
+
});
|
|
864
|
+
},
|
|
865
|
+
/**
|
|
866
|
+
* Retrieves the user\'s transaction history (any change in balance).
|
|
867
|
+
* @summary /account/transactions
|
|
868
|
+
* @param {Array<TransactionType>} [types] Optional query parameter to filter transactions by type.
|
|
869
|
+
* @param {string} [assetSymbol] Optional query parameter to filter transactions by asset bank address.
|
|
870
|
+
* @param {number} [startTimeAtMillis] Start time in milliseconds. Defaults to 7 days ago if not specified.
|
|
871
|
+
* @param {number} [endTimeAtMillis] End time in milliseconds. Defaults to now if not specified. Must be greater than start time and must be less than 7 days apart.
|
|
872
|
+
* @param {number} [limit] Default 500; max 1000.
|
|
873
|
+
* @param {number} [page] The page number to retrieve in a paginated response.
|
|
874
|
+
* @param {*} [options] Override http request option.
|
|
875
|
+
* @throws {RequiredError}
|
|
876
|
+
*/
|
|
877
|
+
getAccountTransactionHistory(types, assetSymbol, startTimeAtMillis, endTimeAtMillis, limit, page, options) {
|
|
878
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
879
|
+
var _a, _b, _c;
|
|
880
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAccountTransactionHistory(types, assetSymbol, startTimeAtMillis, endTimeAtMillis, limit, page, options);
|
|
881
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
882
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AccountDataApi.getAccountTransactionHistory']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
883
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
884
|
+
});
|
|
885
|
+
},
|
|
886
|
+
/**
|
|
887
|
+
* Update user\'s account preferences. This will overwrite the preferences, so always send the full object.
|
|
888
|
+
* @summary /account/preferences
|
|
889
|
+
* @param {UpdateAccountPreferenceRequest} updateAccountPreferenceRequest
|
|
890
|
+
* @param {*} [options] Override http request option.
|
|
891
|
+
* @throws {RequiredError}
|
|
892
|
+
*/
|
|
893
|
+
putAccountPreferences(updateAccountPreferenceRequest, options) {
|
|
894
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
895
|
+
var _a, _b, _c;
|
|
896
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.putAccountPreferences(updateAccountPreferenceRequest, options);
|
|
897
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
898
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AccountDataApi.putAccountPreferences']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
899
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
900
|
+
});
|
|
901
|
+
},
|
|
902
|
+
/**
|
|
903
|
+
* Sponsors a transaction if it\'s eligible for sponsorship based on allowlisted methods and kinds.
|
|
904
|
+
* @summary /account/sponsorTx
|
|
905
|
+
* @param {SponsorTxRequest} sponsorTxRequest
|
|
906
|
+
* @param {*} [options] Override http request option.
|
|
907
|
+
* @throws {RequiredError}
|
|
908
|
+
*/
|
|
909
|
+
sponsorTx(sponsorTxRequest, options) {
|
|
910
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
911
|
+
var _a, _b, _c;
|
|
912
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.sponsorTx(sponsorTxRequest, options);
|
|
913
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
914
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AccountDataApi.sponsorTx']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
915
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
916
|
+
});
|
|
917
|
+
},
|
|
918
|
+
};
|
|
919
|
+
};
|
|
920
|
+
exports.AccountDataApiFp = AccountDataApiFp;
|
|
921
|
+
/**
|
|
922
|
+
* AccountDataApi - factory interface
|
|
923
|
+
* @export
|
|
924
|
+
*/
|
|
925
|
+
const AccountDataApiFactory = function (configuration, basePath, axios) {
|
|
926
|
+
const localVarFp = (0, exports.AccountDataApiFp)(configuration);
|
|
927
|
+
return {
|
|
928
|
+
/**
|
|
929
|
+
* Retrieves the user\'s account details.
|
|
930
|
+
* @summary /account
|
|
931
|
+
* @param {string} [accountAddress] Account address to fetch account details by.
|
|
932
|
+
* @param {*} [options] Override http request option.
|
|
933
|
+
* @throws {RequiredError}
|
|
934
|
+
*/
|
|
935
|
+
getAccountDetails(accountAddress, options) {
|
|
936
|
+
return localVarFp.getAccountDetails(accountAddress, options).then((request) => request(axios, basePath));
|
|
937
|
+
},
|
|
938
|
+
/**
|
|
939
|
+
* Retrieves the funding rate history for a specific account.
|
|
940
|
+
* @summary /account/fundingRateHistory
|
|
941
|
+
* @param {string} [accountAddress] Account address to filter funding rate history by.
|
|
942
|
+
* @param {number} [limit] Default 500; max 1000.
|
|
943
|
+
* @param {number} [page] The page number to retrieve in a paginated response.
|
|
944
|
+
* @param {*} [options] Override http request option.
|
|
945
|
+
* @throws {RequiredError}
|
|
946
|
+
*/
|
|
947
|
+
getAccountFundingRateHistory(accountAddress, limit, page, options) {
|
|
948
|
+
return localVarFp.getAccountFundingRateHistory(accountAddress, limit, page, options).then((request) => request(axios, basePath));
|
|
949
|
+
},
|
|
950
|
+
/**
|
|
951
|
+
* Retrieves the user\'s account preferences.
|
|
952
|
+
* @summary /account/preferences
|
|
953
|
+
* @param {*} [options] Override http request option.
|
|
954
|
+
* @throws {RequiredError}
|
|
955
|
+
*/
|
|
956
|
+
getAccountPreferences(options) {
|
|
957
|
+
return localVarFp.getAccountPreferences(options).then((request) => request(axios, basePath));
|
|
958
|
+
},
|
|
959
|
+
/**
|
|
960
|
+
* Retrieves the user\'s trade history.
|
|
961
|
+
* @summary /account/trades
|
|
962
|
+
* @param {string} [symbol] Market address to filter trades by. If not specified, returns trades for all markets.
|
|
963
|
+
* @param {number} [startTimeAtMillis] Start time in milliseconds. Defaults to 7 days ago if not specified.
|
|
964
|
+
* @param {number} [endTimeAtMillis] End time in milliseconds. Defaults to now if not specified. Must be greater than start time and must be less than 7 days apart.
|
|
965
|
+
* @param {number} [limit] Default 500; max 1000.
|
|
966
|
+
* @param {TradeType} [tradeType] Type of trade. By default returns all. UNSPECIFIED returns all.
|
|
967
|
+
* @param {number} [page] The page number to retrieve in a paginated response.
|
|
968
|
+
* @param {*} [options] Override http request option.
|
|
969
|
+
* @throws {RequiredError}
|
|
970
|
+
*/
|
|
971
|
+
getAccountTrades(symbol, startTimeAtMillis, endTimeAtMillis, limit, tradeType, page, options) {
|
|
972
|
+
return localVarFp.getAccountTrades(symbol, startTimeAtMillis, endTimeAtMillis, limit, tradeType, page, options).then((request) => request(axios, basePath));
|
|
973
|
+
},
|
|
974
|
+
/**
|
|
975
|
+
* Retrieves the user\'s transaction history (any change in balance).
|
|
976
|
+
* @summary /account/transactions
|
|
977
|
+
* @param {Array<TransactionType>} [types] Optional query parameter to filter transactions by type.
|
|
978
|
+
* @param {string} [assetSymbol] Optional query parameter to filter transactions by asset bank address.
|
|
979
|
+
* @param {number} [startTimeAtMillis] Start time in milliseconds. Defaults to 7 days ago if not specified.
|
|
980
|
+
* @param {number} [endTimeAtMillis] End time in milliseconds. Defaults to now if not specified. Must be greater than start time and must be less than 7 days apart.
|
|
981
|
+
* @param {number} [limit] Default 500; max 1000.
|
|
982
|
+
* @param {number} [page] The page number to retrieve in a paginated response.
|
|
983
|
+
* @param {*} [options] Override http request option.
|
|
984
|
+
* @throws {RequiredError}
|
|
985
|
+
*/
|
|
986
|
+
getAccountTransactionHistory(types, assetSymbol, startTimeAtMillis, endTimeAtMillis, limit, page, options) {
|
|
987
|
+
return localVarFp.getAccountTransactionHistory(types, assetSymbol, startTimeAtMillis, endTimeAtMillis, limit, page, options).then((request) => request(axios, basePath));
|
|
988
|
+
},
|
|
989
|
+
/**
|
|
990
|
+
* Update user\'s account preferences. This will overwrite the preferences, so always send the full object.
|
|
991
|
+
* @summary /account/preferences
|
|
992
|
+
* @param {UpdateAccountPreferenceRequest} updateAccountPreferenceRequest
|
|
993
|
+
* @param {*} [options] Override http request option.
|
|
994
|
+
* @throws {RequiredError}
|
|
995
|
+
*/
|
|
996
|
+
putAccountPreferences(updateAccountPreferenceRequest, options) {
|
|
997
|
+
return localVarFp.putAccountPreferences(updateAccountPreferenceRequest, options).then((request) => request(axios, basePath));
|
|
998
|
+
},
|
|
999
|
+
/**
|
|
1000
|
+
* Sponsors a transaction if it\'s eligible for sponsorship based on allowlisted methods and kinds.
|
|
1001
|
+
* @summary /account/sponsorTx
|
|
1002
|
+
* @param {SponsorTxRequest} sponsorTxRequest
|
|
1003
|
+
* @param {*} [options] Override http request option.
|
|
1004
|
+
* @throws {RequiredError}
|
|
1005
|
+
*/
|
|
1006
|
+
sponsorTx(sponsorTxRequest, options) {
|
|
1007
|
+
return localVarFp.sponsorTx(sponsorTxRequest, options).then((request) => request(axios, basePath));
|
|
1008
|
+
},
|
|
1009
|
+
};
|
|
1010
|
+
};
|
|
1011
|
+
exports.AccountDataApiFactory = AccountDataApiFactory;
|
|
1012
|
+
/**
|
|
1013
|
+
* AccountDataApi - object-oriented interface
|
|
1014
|
+
* @export
|
|
1015
|
+
* @class AccountDataApi
|
|
1016
|
+
* @extends {BaseAPI}
|
|
1017
|
+
*/
|
|
1018
|
+
class AccountDataApi extends base_1.BaseAPI {
|
|
1019
|
+
/**
|
|
1020
|
+
* Retrieves the user\'s account details.
|
|
1021
|
+
* @summary /account
|
|
1022
|
+
* @param {string} [accountAddress] Account address to fetch account details by.
|
|
1023
|
+
* @param {*} [options] Override http request option.
|
|
1024
|
+
* @throws {RequiredError}
|
|
1025
|
+
* @memberof AccountDataApi
|
|
1026
|
+
*/
|
|
1027
|
+
getAccountDetails(accountAddress, options) {
|
|
1028
|
+
return (0, exports.AccountDataApiFp)(this.configuration).getAccountDetails(accountAddress, options).then((request) => request(this.axios, this.basePath));
|
|
1029
|
+
}
|
|
1030
|
+
/**
|
|
1031
|
+
* Retrieves the funding rate history for a specific account.
|
|
1032
|
+
* @summary /account/fundingRateHistory
|
|
1033
|
+
* @param {string} [accountAddress] Account address to filter funding rate history by.
|
|
1034
|
+
* @param {number} [limit] Default 500; max 1000.
|
|
1035
|
+
* @param {number} [page] The page number to retrieve in a paginated response.
|
|
1036
|
+
* @param {*} [options] Override http request option.
|
|
1037
|
+
* @throws {RequiredError}
|
|
1038
|
+
* @memberof AccountDataApi
|
|
1039
|
+
*/
|
|
1040
|
+
getAccountFundingRateHistory(accountAddress, limit, page, options) {
|
|
1041
|
+
return (0, exports.AccountDataApiFp)(this.configuration).getAccountFundingRateHistory(accountAddress, limit, page, options).then((request) => request(this.axios, this.basePath));
|
|
1042
|
+
}
|
|
1043
|
+
/**
|
|
1044
|
+
* Retrieves the user\'s account preferences.
|
|
1045
|
+
* @summary /account/preferences
|
|
1046
|
+
* @param {*} [options] Override http request option.
|
|
1047
|
+
* @throws {RequiredError}
|
|
1048
|
+
* @memberof AccountDataApi
|
|
1049
|
+
*/
|
|
1050
|
+
getAccountPreferences(options) {
|
|
1051
|
+
return (0, exports.AccountDataApiFp)(this.configuration).getAccountPreferences(options).then((request) => request(this.axios, this.basePath));
|
|
1052
|
+
}
|
|
1053
|
+
/**
|
|
1054
|
+
* Retrieves the user\'s trade history.
|
|
1055
|
+
* @summary /account/trades
|
|
1056
|
+
* @param {string} [symbol] Market address to filter trades by. If not specified, returns trades for all markets.
|
|
1057
|
+
* @param {number} [startTimeAtMillis] Start time in milliseconds. Defaults to 7 days ago if not specified.
|
|
1058
|
+
* @param {number} [endTimeAtMillis] End time in milliseconds. Defaults to now if not specified. Must be greater than start time and must be less than 7 days apart.
|
|
1059
|
+
* @param {number} [limit] Default 500; max 1000.
|
|
1060
|
+
* @param {TradeType} [tradeType] Type of trade. By default returns all. UNSPECIFIED returns all.
|
|
1061
|
+
* @param {number} [page] The page number to retrieve in a paginated response.
|
|
1062
|
+
* @param {*} [options] Override http request option.
|
|
1063
|
+
* @throws {RequiredError}
|
|
1064
|
+
* @memberof AccountDataApi
|
|
1065
|
+
*/
|
|
1066
|
+
getAccountTrades(symbol, startTimeAtMillis, endTimeAtMillis, limit, tradeType, page, options) {
|
|
1067
|
+
return (0, exports.AccountDataApiFp)(this.configuration).getAccountTrades(symbol, startTimeAtMillis, endTimeAtMillis, limit, tradeType, page, options).then((request) => request(this.axios, this.basePath));
|
|
1068
|
+
}
|
|
1069
|
+
/**
|
|
1070
|
+
* Retrieves the user\'s transaction history (any change in balance).
|
|
1071
|
+
* @summary /account/transactions
|
|
1072
|
+
* @param {Array<TransactionType>} [types] Optional query parameter to filter transactions by type.
|
|
1073
|
+
* @param {string} [assetSymbol] Optional query parameter to filter transactions by asset bank address.
|
|
1074
|
+
* @param {number} [startTimeAtMillis] Start time in milliseconds. Defaults to 7 days ago if not specified.
|
|
1075
|
+
* @param {number} [endTimeAtMillis] End time in milliseconds. Defaults to now if not specified. Must be greater than start time and must be less than 7 days apart.
|
|
1076
|
+
* @param {number} [limit] Default 500; max 1000.
|
|
1077
|
+
* @param {number} [page] The page number to retrieve in a paginated response.
|
|
1078
|
+
* @param {*} [options] Override http request option.
|
|
1079
|
+
* @throws {RequiredError}
|
|
1080
|
+
* @memberof AccountDataApi
|
|
1081
|
+
*/
|
|
1082
|
+
getAccountTransactionHistory(types, assetSymbol, startTimeAtMillis, endTimeAtMillis, limit, page, options) {
|
|
1083
|
+
return (0, exports.AccountDataApiFp)(this.configuration).getAccountTransactionHistory(types, assetSymbol, startTimeAtMillis, endTimeAtMillis, limit, page, options).then((request) => request(this.axios, this.basePath));
|
|
1084
|
+
}
|
|
1085
|
+
/**
|
|
1086
|
+
* Update user\'s account preferences. This will overwrite the preferences, so always send the full object.
|
|
1087
|
+
* @summary /account/preferences
|
|
1088
|
+
* @param {UpdateAccountPreferenceRequest} updateAccountPreferenceRequest
|
|
1089
|
+
* @param {*} [options] Override http request option.
|
|
1090
|
+
* @throws {RequiredError}
|
|
1091
|
+
* @memberof AccountDataApi
|
|
1092
|
+
*/
|
|
1093
|
+
putAccountPreferences(updateAccountPreferenceRequest, options) {
|
|
1094
|
+
return (0, exports.AccountDataApiFp)(this.configuration).putAccountPreferences(updateAccountPreferenceRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1095
|
+
}
|
|
1096
|
+
/**
|
|
1097
|
+
* Sponsors a transaction if it\'s eligible for sponsorship based on allowlisted methods and kinds.
|
|
1098
|
+
* @summary /account/sponsorTx
|
|
1099
|
+
* @param {SponsorTxRequest} sponsorTxRequest
|
|
1100
|
+
* @param {*} [options] Override http request option.
|
|
1101
|
+
* @throws {RequiredError}
|
|
1102
|
+
* @memberof AccountDataApi
|
|
1103
|
+
*/
|
|
1104
|
+
sponsorTx(sponsorTxRequest, options) {
|
|
1105
|
+
return (0, exports.AccountDataApiFp)(this.configuration).sponsorTx(sponsorTxRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1108
|
+
exports.AccountDataApi = AccountDataApi;
|
|
1109
|
+
/**
|
|
1110
|
+
* AuthApi - axios parameter creator
|
|
1111
|
+
* @export
|
|
1112
|
+
*/
|
|
1113
|
+
const AuthApiAxiosParamCreator = function (configuration) {
|
|
1114
|
+
return {
|
|
1115
|
+
/**
|
|
1116
|
+
*
|
|
1117
|
+
* @param {*} [options] Override http request option.
|
|
1118
|
+
* @throws {RequiredError}
|
|
1119
|
+
*/
|
|
1120
|
+
authJwksGet: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
1121
|
+
const localVarPath = `/auth/jwks`;
|
|
1122
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1123
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1124
|
+
let baseOptions;
|
|
1125
|
+
if (configuration) {
|
|
1126
|
+
baseOptions = configuration.baseOptions;
|
|
1127
|
+
}
|
|
1128
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1129
|
+
const localVarHeaderParameter = {};
|
|
1130
|
+
const localVarQueryParameter = {};
|
|
1131
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1132
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1133
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1134
|
+
return {
|
|
1135
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1136
|
+
options: localVarRequestOptions,
|
|
1137
|
+
};
|
|
1138
|
+
}),
|
|
1139
|
+
/**
|
|
1140
|
+
* login with token
|
|
1141
|
+
* @param {string} payloadSignature
|
|
1142
|
+
* @param {LoginRequest} loginRequest
|
|
1143
|
+
* @param {number} [refreshTokenValidForSeconds] The number of seconds the refresh token is valid for. If not provided, the default is 30 days.
|
|
1144
|
+
* @param {boolean} [readOnly]
|
|
1145
|
+
* @param {*} [options] Override http request option.
|
|
1146
|
+
* @throws {RequiredError}
|
|
1147
|
+
*/
|
|
1148
|
+
authTokenPost: (payloadSignature_1, loginRequest_1, refreshTokenValidForSeconds_1, readOnly_1, ...args_1) => __awaiter(this, [payloadSignature_1, loginRequest_1, refreshTokenValidForSeconds_1, readOnly_1, ...args_1], void 0, function* (payloadSignature, loginRequest, refreshTokenValidForSeconds, readOnly, options = {}) {
|
|
1149
|
+
// verify required parameter 'payloadSignature' is not null or undefined
|
|
1150
|
+
(0, common_1.assertParamExists)('authTokenPost', 'payloadSignature', payloadSignature);
|
|
1151
|
+
// verify required parameter 'loginRequest' is not null or undefined
|
|
1152
|
+
(0, common_1.assertParamExists)('authTokenPost', 'loginRequest', loginRequest);
|
|
1153
|
+
const localVarPath = `/auth/token`;
|
|
1154
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1155
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1156
|
+
let baseOptions;
|
|
1157
|
+
if (configuration) {
|
|
1158
|
+
baseOptions = configuration.baseOptions;
|
|
1159
|
+
}
|
|
1160
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
1161
|
+
const localVarHeaderParameter = {};
|
|
1162
|
+
const localVarQueryParameter = {};
|
|
1163
|
+
if (refreshTokenValidForSeconds !== undefined) {
|
|
1164
|
+
localVarQueryParameter['refreshTokenValidForSeconds'] = refreshTokenValidForSeconds;
|
|
1165
|
+
}
|
|
1166
|
+
if (readOnly !== undefined) {
|
|
1167
|
+
localVarQueryParameter['readOnly'] = readOnly;
|
|
1168
|
+
}
|
|
1169
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1170
|
+
if (payloadSignature != null) {
|
|
1171
|
+
localVarHeaderParameter['payloadSignature'] = String(payloadSignature);
|
|
1172
|
+
}
|
|
1173
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1174
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1175
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1176
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(loginRequest, localVarRequestOptions, configuration);
|
|
1177
|
+
return {
|
|
1178
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1179
|
+
options: localVarRequestOptions,
|
|
1180
|
+
};
|
|
1181
|
+
}),
|
|
1182
|
+
/**
|
|
1183
|
+
* Retrieves a new auth token for an account. Expiry is set to 5 min
|
|
1184
|
+
* @param {RefreshTokenRequest} refreshTokenRequest
|
|
1185
|
+
* @param {*} [options] Override http request option.
|
|
1186
|
+
* @throws {RequiredError}
|
|
1187
|
+
*/
|
|
1188
|
+
authTokenRefreshPut: (refreshTokenRequest_1, ...args_1) => __awaiter(this, [refreshTokenRequest_1, ...args_1], void 0, function* (refreshTokenRequest, options = {}) {
|
|
1189
|
+
// verify required parameter 'refreshTokenRequest' is not null or undefined
|
|
1190
|
+
(0, common_1.assertParamExists)('authTokenRefreshPut', 'refreshTokenRequest', refreshTokenRequest);
|
|
1191
|
+
const localVarPath = `/auth/token/refresh`;
|
|
1192
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1193
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1194
|
+
let baseOptions;
|
|
1195
|
+
if (configuration) {
|
|
1196
|
+
baseOptions = configuration.baseOptions;
|
|
1197
|
+
}
|
|
1198
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
|
|
1199
|
+
const localVarHeaderParameter = {};
|
|
1200
|
+
const localVarQueryParameter = {};
|
|
1201
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1202
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1203
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1204
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1205
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(refreshTokenRequest, localVarRequestOptions, configuration);
|
|
1206
|
+
return {
|
|
1207
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1208
|
+
options: localVarRequestOptions,
|
|
1209
|
+
};
|
|
1210
|
+
}),
|
|
1211
|
+
/**
|
|
1212
|
+
* login compatible with BCS payload with intent bytes
|
|
1213
|
+
* @param {string} payloadSignature
|
|
1214
|
+
* @param {LoginRequest} loginRequest
|
|
1215
|
+
* @param {number} [refreshTokenValidForSeconds] The number of seconds the refresh token is valid for. If not provided, the default is 30 days.
|
|
1216
|
+
* @param {boolean} [readOnly]
|
|
1217
|
+
* @param {*} [options] Override http request option.
|
|
1218
|
+
* @throws {RequiredError}
|
|
1219
|
+
*/
|
|
1220
|
+
authV2TokenPost: (payloadSignature_1, loginRequest_1, refreshTokenValidForSeconds_1, readOnly_1, ...args_1) => __awaiter(this, [payloadSignature_1, loginRequest_1, refreshTokenValidForSeconds_1, readOnly_1, ...args_1], void 0, function* (payloadSignature, loginRequest, refreshTokenValidForSeconds, readOnly, options = {}) {
|
|
1221
|
+
// verify required parameter 'payloadSignature' is not null or undefined
|
|
1222
|
+
(0, common_1.assertParamExists)('authV2TokenPost', 'payloadSignature', payloadSignature);
|
|
1223
|
+
// verify required parameter 'loginRequest' is not null or undefined
|
|
1224
|
+
(0, common_1.assertParamExists)('authV2TokenPost', 'loginRequest', loginRequest);
|
|
1225
|
+
const localVarPath = `/auth/v2/token`;
|
|
1226
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1227
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1228
|
+
let baseOptions;
|
|
1229
|
+
if (configuration) {
|
|
1230
|
+
baseOptions = configuration.baseOptions;
|
|
1231
|
+
}
|
|
1232
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
1233
|
+
const localVarHeaderParameter = {};
|
|
1234
|
+
const localVarQueryParameter = {};
|
|
1235
|
+
if (refreshTokenValidForSeconds !== undefined) {
|
|
1236
|
+
localVarQueryParameter['refreshTokenValidForSeconds'] = refreshTokenValidForSeconds;
|
|
1237
|
+
}
|
|
1238
|
+
if (readOnly !== undefined) {
|
|
1239
|
+
localVarQueryParameter['readOnly'] = readOnly;
|
|
1240
|
+
}
|
|
1241
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1242
|
+
if (payloadSignature != null) {
|
|
1243
|
+
localVarHeaderParameter['payloadSignature'] = String(payloadSignature);
|
|
1244
|
+
}
|
|
1245
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1246
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1247
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1248
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(loginRequest, localVarRequestOptions, configuration);
|
|
1249
|
+
return {
|
|
1250
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1251
|
+
options: localVarRequestOptions,
|
|
1252
|
+
};
|
|
1253
|
+
}),
|
|
1254
|
+
};
|
|
1255
|
+
};
|
|
1256
|
+
exports.AuthApiAxiosParamCreator = AuthApiAxiosParamCreator;
|
|
1257
|
+
/**
|
|
1258
|
+
* AuthApi - functional programming interface
|
|
1259
|
+
* @export
|
|
1260
|
+
*/
|
|
1261
|
+
const AuthApiFp = function (configuration) {
|
|
1262
|
+
const localVarAxiosParamCreator = (0, exports.AuthApiAxiosParamCreator)(configuration);
|
|
1263
|
+
return {
|
|
1264
|
+
/**
|
|
1265
|
+
*
|
|
1266
|
+
* @param {*} [options] Override http request option.
|
|
1267
|
+
* @throws {RequiredError}
|
|
1268
|
+
*/
|
|
1269
|
+
authJwksGet(options) {
|
|
1270
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1271
|
+
var _a, _b, _c;
|
|
1272
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.authJwksGet(options);
|
|
1273
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1274
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AuthApi.authJwksGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1275
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1276
|
+
});
|
|
1277
|
+
},
|
|
1278
|
+
/**
|
|
1279
|
+
* login with token
|
|
1280
|
+
* @param {string} payloadSignature
|
|
1281
|
+
* @param {LoginRequest} loginRequest
|
|
1282
|
+
* @param {number} [refreshTokenValidForSeconds] The number of seconds the refresh token is valid for. If not provided, the default is 30 days.
|
|
1283
|
+
* @param {boolean} [readOnly]
|
|
1284
|
+
* @param {*} [options] Override http request option.
|
|
1285
|
+
* @throws {RequiredError}
|
|
1286
|
+
*/
|
|
1287
|
+
authTokenPost(payloadSignature, loginRequest, refreshTokenValidForSeconds, readOnly, options) {
|
|
1288
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1289
|
+
var _a, _b, _c;
|
|
1290
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.authTokenPost(payloadSignature, loginRequest, refreshTokenValidForSeconds, readOnly, options);
|
|
1291
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1292
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AuthApi.authTokenPost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1293
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1294
|
+
});
|
|
1295
|
+
},
|
|
1296
|
+
/**
|
|
1297
|
+
* Retrieves a new auth token for an account. Expiry is set to 5 min
|
|
1298
|
+
* @param {RefreshTokenRequest} refreshTokenRequest
|
|
1299
|
+
* @param {*} [options] Override http request option.
|
|
1300
|
+
* @throws {RequiredError}
|
|
1301
|
+
*/
|
|
1302
|
+
authTokenRefreshPut(refreshTokenRequest, options) {
|
|
1303
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1304
|
+
var _a, _b, _c;
|
|
1305
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.authTokenRefreshPut(refreshTokenRequest, options);
|
|
1306
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1307
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AuthApi.authTokenRefreshPut']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1308
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1309
|
+
});
|
|
1310
|
+
},
|
|
1311
|
+
/**
|
|
1312
|
+
* login compatible with BCS payload with intent bytes
|
|
1313
|
+
* @param {string} payloadSignature
|
|
1314
|
+
* @param {LoginRequest} loginRequest
|
|
1315
|
+
* @param {number} [refreshTokenValidForSeconds] The number of seconds the refresh token is valid for. If not provided, the default is 30 days.
|
|
1316
|
+
* @param {boolean} [readOnly]
|
|
1317
|
+
* @param {*} [options] Override http request option.
|
|
1318
|
+
* @throws {RequiredError}
|
|
1319
|
+
*/
|
|
1320
|
+
authV2TokenPost(payloadSignature, loginRequest, refreshTokenValidForSeconds, readOnly, options) {
|
|
1321
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1322
|
+
var _a, _b, _c;
|
|
1323
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.authV2TokenPost(payloadSignature, loginRequest, refreshTokenValidForSeconds, readOnly, options);
|
|
1324
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1325
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AuthApi.authV2TokenPost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1326
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1327
|
+
});
|
|
1328
|
+
},
|
|
1329
|
+
};
|
|
1330
|
+
};
|
|
1331
|
+
exports.AuthApiFp = AuthApiFp;
|
|
1332
|
+
/**
|
|
1333
|
+
* AuthApi - factory interface
|
|
1334
|
+
* @export
|
|
1335
|
+
*/
|
|
1336
|
+
const AuthApiFactory = function (configuration, basePath, axios) {
|
|
1337
|
+
const localVarFp = (0, exports.AuthApiFp)(configuration);
|
|
1338
|
+
return {
|
|
1339
|
+
/**
|
|
1340
|
+
*
|
|
1341
|
+
* @param {*} [options] Override http request option.
|
|
1342
|
+
* @throws {RequiredError}
|
|
1343
|
+
*/
|
|
1344
|
+
authJwksGet(options) {
|
|
1345
|
+
return localVarFp.authJwksGet(options).then((request) => request(axios, basePath));
|
|
1346
|
+
},
|
|
1347
|
+
/**
|
|
1348
|
+
* login with token
|
|
1349
|
+
* @param {string} payloadSignature
|
|
1350
|
+
* @param {LoginRequest} loginRequest
|
|
1351
|
+
* @param {number} [refreshTokenValidForSeconds] The number of seconds the refresh token is valid for. If not provided, the default is 30 days.
|
|
1352
|
+
* @param {boolean} [readOnly]
|
|
1353
|
+
* @param {*} [options] Override http request option.
|
|
1354
|
+
* @throws {RequiredError}
|
|
1355
|
+
*/
|
|
1356
|
+
authTokenPost(payloadSignature, loginRequest, refreshTokenValidForSeconds, readOnly, options) {
|
|
1357
|
+
return localVarFp.authTokenPost(payloadSignature, loginRequest, refreshTokenValidForSeconds, readOnly, options).then((request) => request(axios, basePath));
|
|
1358
|
+
},
|
|
1359
|
+
/**
|
|
1360
|
+
* Retrieves a new auth token for an account. Expiry is set to 5 min
|
|
1361
|
+
* @param {RefreshTokenRequest} refreshTokenRequest
|
|
1362
|
+
* @param {*} [options] Override http request option.
|
|
1363
|
+
* @throws {RequiredError}
|
|
1364
|
+
*/
|
|
1365
|
+
authTokenRefreshPut(refreshTokenRequest, options) {
|
|
1366
|
+
return localVarFp.authTokenRefreshPut(refreshTokenRequest, options).then((request) => request(axios, basePath));
|
|
1367
|
+
},
|
|
1368
|
+
/**
|
|
1369
|
+
* login compatible with BCS payload with intent bytes
|
|
1370
|
+
* @param {string} payloadSignature
|
|
1371
|
+
* @param {LoginRequest} loginRequest
|
|
1372
|
+
* @param {number} [refreshTokenValidForSeconds] The number of seconds the refresh token is valid for. If not provided, the default is 30 days.
|
|
1373
|
+
* @param {boolean} [readOnly]
|
|
1374
|
+
* @param {*} [options] Override http request option.
|
|
1375
|
+
* @throws {RequiredError}
|
|
1376
|
+
*/
|
|
1377
|
+
authV2TokenPost(payloadSignature, loginRequest, refreshTokenValidForSeconds, readOnly, options) {
|
|
1378
|
+
return localVarFp.authV2TokenPost(payloadSignature, loginRequest, refreshTokenValidForSeconds, readOnly, options).then((request) => request(axios, basePath));
|
|
1379
|
+
},
|
|
1380
|
+
};
|
|
1381
|
+
};
|
|
1382
|
+
exports.AuthApiFactory = AuthApiFactory;
|
|
1383
|
+
/**
|
|
1384
|
+
* AuthApi - object-oriented interface
|
|
1385
|
+
* @export
|
|
1386
|
+
* @class AuthApi
|
|
1387
|
+
* @extends {BaseAPI}
|
|
1388
|
+
*/
|
|
1389
|
+
class AuthApi extends base_1.BaseAPI {
|
|
1390
|
+
/**
|
|
1391
|
+
*
|
|
1392
|
+
* @param {*} [options] Override http request option.
|
|
1393
|
+
* @throws {RequiredError}
|
|
1394
|
+
* @memberof AuthApi
|
|
1395
|
+
*/
|
|
1396
|
+
authJwksGet(options) {
|
|
1397
|
+
return (0, exports.AuthApiFp)(this.configuration).authJwksGet(options).then((request) => request(this.axios, this.basePath));
|
|
1398
|
+
}
|
|
1399
|
+
/**
|
|
1400
|
+
* login with token
|
|
1401
|
+
* @param {string} payloadSignature
|
|
1402
|
+
* @param {LoginRequest} loginRequest
|
|
1403
|
+
* @param {number} [refreshTokenValidForSeconds] The number of seconds the refresh token is valid for. If not provided, the default is 30 days.
|
|
1404
|
+
* @param {boolean} [readOnly]
|
|
1405
|
+
* @param {*} [options] Override http request option.
|
|
1406
|
+
* @throws {RequiredError}
|
|
1407
|
+
* @memberof AuthApi
|
|
1408
|
+
*/
|
|
1409
|
+
authTokenPost(payloadSignature, loginRequest, refreshTokenValidForSeconds, readOnly, options) {
|
|
1410
|
+
return (0, exports.AuthApiFp)(this.configuration).authTokenPost(payloadSignature, loginRequest, refreshTokenValidForSeconds, readOnly, options).then((request) => request(this.axios, this.basePath));
|
|
1411
|
+
}
|
|
1412
|
+
/**
|
|
1413
|
+
* Retrieves a new auth token for an account. Expiry is set to 5 min
|
|
1414
|
+
* @param {RefreshTokenRequest} refreshTokenRequest
|
|
1415
|
+
* @param {*} [options] Override http request option.
|
|
1416
|
+
* @throws {RequiredError}
|
|
1417
|
+
* @memberof AuthApi
|
|
1418
|
+
*/
|
|
1419
|
+
authTokenRefreshPut(refreshTokenRequest, options) {
|
|
1420
|
+
return (0, exports.AuthApiFp)(this.configuration).authTokenRefreshPut(refreshTokenRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1421
|
+
}
|
|
1422
|
+
/**
|
|
1423
|
+
* login compatible with BCS payload with intent bytes
|
|
1424
|
+
* @param {string} payloadSignature
|
|
1425
|
+
* @param {LoginRequest} loginRequest
|
|
1426
|
+
* @param {number} [refreshTokenValidForSeconds] The number of seconds the refresh token is valid for. If not provided, the default is 30 days.
|
|
1427
|
+
* @param {boolean} [readOnly]
|
|
1428
|
+
* @param {*} [options] Override http request option.
|
|
1429
|
+
* @throws {RequiredError}
|
|
1430
|
+
* @memberof AuthApi
|
|
1431
|
+
*/
|
|
1432
|
+
authV2TokenPost(payloadSignature, loginRequest, refreshTokenValidForSeconds, readOnly, options) {
|
|
1433
|
+
return (0, exports.AuthApiFp)(this.configuration).authV2TokenPost(payloadSignature, loginRequest, refreshTokenValidForSeconds, readOnly, options).then((request) => request(this.axios, this.basePath));
|
|
1434
|
+
}
|
|
1435
|
+
}
|
|
1436
|
+
exports.AuthApi = AuthApi;
|
|
1437
|
+
/**
|
|
1438
|
+
* ExchangeApi - axios parameter creator
|
|
1439
|
+
* @export
|
|
1440
|
+
*/
|
|
1441
|
+
const ExchangeApiAxiosParamCreator = function (configuration) {
|
|
1442
|
+
return {
|
|
1443
|
+
/**
|
|
1444
|
+
* Retrieves all market ticker information.
|
|
1445
|
+
* @summary /exchange/tickers
|
|
1446
|
+
* @param {*} [options] Override http request option.
|
|
1447
|
+
* @throws {RequiredError}
|
|
1448
|
+
*/
|
|
1449
|
+
getAllMarketTicker: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
1450
|
+
const localVarPath = `/v1/exchange/tickers`;
|
|
1451
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1452
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1453
|
+
let baseOptions;
|
|
1454
|
+
if (configuration) {
|
|
1455
|
+
baseOptions = configuration.baseOptions;
|
|
1456
|
+
}
|
|
1457
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1458
|
+
const localVarHeaderParameter = {};
|
|
1459
|
+
const localVarQueryParameter = {};
|
|
1460
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1461
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1462
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1463
|
+
return {
|
|
1464
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1465
|
+
options: localVarRequestOptions,
|
|
1466
|
+
};
|
|
1467
|
+
}),
|
|
1468
|
+
/**
|
|
1469
|
+
* Retrieves candle stick data for a market.
|
|
1470
|
+
* @summary /exchange/candlesticks
|
|
1471
|
+
* @param {string} symbol The market symbol to get the klines for.
|
|
1472
|
+
* @param {KlineInterval} interval The interval to get the klines for.
|
|
1473
|
+
* @param {CandlePriceType} type Candle price type (last price, market price or oracle).
|
|
1474
|
+
* @param {number} [startTimeAtMillis] Timestamp in milliseconds in ms to get klines from.
|
|
1475
|
+
* @param {number} [endTimeAtMillis] Timestamp in milliseconds in ms to get klines until.
|
|
1476
|
+
* @param {number} [limit] Default 50; max 1000.
|
|
1477
|
+
* @param {number} [page] The page number to retrieve in a paginated response.
|
|
1478
|
+
* @param {*} [options] Override http request option.
|
|
1479
|
+
* @throws {RequiredError}
|
|
1480
|
+
*/
|
|
1481
|
+
getCandlestickData: (symbol_1, interval_1, type_1, startTimeAtMillis_1, endTimeAtMillis_1, limit_1, page_1, ...args_1) => __awaiter(this, [symbol_1, interval_1, type_1, startTimeAtMillis_1, endTimeAtMillis_1, limit_1, page_1, ...args_1], void 0, function* (symbol, interval, type, startTimeAtMillis, endTimeAtMillis, limit, page, options = {}) {
|
|
1482
|
+
// verify required parameter 'symbol' is not null or undefined
|
|
1483
|
+
(0, common_1.assertParamExists)('getCandlestickData', 'symbol', symbol);
|
|
1484
|
+
// verify required parameter 'interval' is not null or undefined
|
|
1485
|
+
(0, common_1.assertParamExists)('getCandlestickData', 'interval', interval);
|
|
1486
|
+
// verify required parameter 'type' is not null or undefined
|
|
1487
|
+
(0, common_1.assertParamExists)('getCandlestickData', 'type', type);
|
|
1488
|
+
const localVarPath = `/v1/exchange/candlesticks`;
|
|
1489
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1490
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1491
|
+
let baseOptions;
|
|
1492
|
+
if (configuration) {
|
|
1493
|
+
baseOptions = configuration.baseOptions;
|
|
1494
|
+
}
|
|
1495
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1496
|
+
const localVarHeaderParameter = {};
|
|
1497
|
+
const localVarQueryParameter = {};
|
|
1498
|
+
if (symbol !== undefined) {
|
|
1499
|
+
localVarQueryParameter['symbol'] = symbol;
|
|
1500
|
+
}
|
|
1501
|
+
if (interval !== undefined) {
|
|
1502
|
+
localVarQueryParameter['interval'] = interval;
|
|
1503
|
+
}
|
|
1504
|
+
if (type !== undefined) {
|
|
1505
|
+
localVarQueryParameter['type'] = type;
|
|
1506
|
+
}
|
|
1507
|
+
if (startTimeAtMillis !== undefined) {
|
|
1508
|
+
localVarQueryParameter['startTimeAtMillis'] = startTimeAtMillis;
|
|
1509
|
+
}
|
|
1510
|
+
if (endTimeAtMillis !== undefined) {
|
|
1511
|
+
localVarQueryParameter['endTimeAtMillis'] = endTimeAtMillis;
|
|
1512
|
+
}
|
|
1513
|
+
if (limit !== undefined) {
|
|
1514
|
+
localVarQueryParameter['limit'] = limit;
|
|
1515
|
+
}
|
|
1516
|
+
if (page !== undefined) {
|
|
1517
|
+
localVarQueryParameter['page'] = page;
|
|
1518
|
+
}
|
|
1519
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1520
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1521
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1522
|
+
return {
|
|
1523
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1524
|
+
options: localVarRequestOptions,
|
|
1525
|
+
};
|
|
1526
|
+
}),
|
|
1527
|
+
/**
|
|
1528
|
+
* Returns the current exchange information including available margin assets, markets, and rules.
|
|
1529
|
+
* @summary /exchange/info
|
|
1530
|
+
* @param {*} [options] Override http request option.
|
|
1531
|
+
* @throws {RequiredError}
|
|
1532
|
+
*/
|
|
1533
|
+
getExchangeInfo: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
1534
|
+
const localVarPath = `/v1/exchange/info`;
|
|
1535
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1536
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1537
|
+
let baseOptions;
|
|
1538
|
+
if (configuration) {
|
|
1539
|
+
baseOptions = configuration.baseOptions;
|
|
1540
|
+
}
|
|
1541
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1542
|
+
const localVarHeaderParameter = {};
|
|
1543
|
+
const localVarQueryParameter = {};
|
|
1544
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1545
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1546
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1547
|
+
return {
|
|
1548
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1549
|
+
options: localVarRequestOptions,
|
|
1550
|
+
};
|
|
1551
|
+
}),
|
|
1552
|
+
/**
|
|
1553
|
+
* Retrieves exchange statistics.
|
|
1554
|
+
* @summary /exchange/stats
|
|
1555
|
+
* @param {StatsInterval} [interval]
|
|
1556
|
+
* @param {number} [startTimeAtMillis] Timestamp in milliseconds.
|
|
1557
|
+
* @param {number} [endTimeAtMillis] Timestamp in milliseconds.
|
|
1558
|
+
* @param {number} [limit] Number of records to return. Default is 30; max is 200.
|
|
1559
|
+
* @param {number} [page] The page number to retrieve in a paginated response.
|
|
1560
|
+
* @param {*} [options] Override http request option.
|
|
1561
|
+
* @throws {RequiredError}
|
|
1562
|
+
*/
|
|
1563
|
+
getExchangeStats: (interval_1, startTimeAtMillis_1, endTimeAtMillis_1, limit_1, page_1, ...args_1) => __awaiter(this, [interval_1, startTimeAtMillis_1, endTimeAtMillis_1, limit_1, page_1, ...args_1], void 0, function* (interval, startTimeAtMillis, endTimeAtMillis, limit, page, options = {}) {
|
|
1564
|
+
const localVarPath = `/v1/exchange/stats`;
|
|
1565
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1566
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1567
|
+
let baseOptions;
|
|
1568
|
+
if (configuration) {
|
|
1569
|
+
baseOptions = configuration.baseOptions;
|
|
1570
|
+
}
|
|
1571
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1572
|
+
const localVarHeaderParameter = {};
|
|
1573
|
+
const localVarQueryParameter = {};
|
|
1574
|
+
if (interval !== undefined) {
|
|
1575
|
+
localVarQueryParameter['interval'] = interval;
|
|
1576
|
+
}
|
|
1577
|
+
if (startTimeAtMillis !== undefined) {
|
|
1578
|
+
localVarQueryParameter['startTimeAtMillis'] = startTimeAtMillis;
|
|
1579
|
+
}
|
|
1580
|
+
if (endTimeAtMillis !== undefined) {
|
|
1581
|
+
localVarQueryParameter['endTimeAtMillis'] = endTimeAtMillis;
|
|
1582
|
+
}
|
|
1583
|
+
if (limit !== undefined) {
|
|
1584
|
+
localVarQueryParameter['limit'] = limit;
|
|
1585
|
+
}
|
|
1586
|
+
if (page !== undefined) {
|
|
1587
|
+
localVarQueryParameter['page'] = page;
|
|
1588
|
+
}
|
|
1589
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1590
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1591
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1592
|
+
return {
|
|
1593
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1594
|
+
options: localVarRequestOptions,
|
|
1595
|
+
};
|
|
1596
|
+
}),
|
|
1597
|
+
/**
|
|
1598
|
+
* Retrieve the funding rate history for a specific market address.
|
|
1599
|
+
* @summary /exchange/fundingRateHistory
|
|
1600
|
+
* @param {string} symbol The market symbol to get funding rate history for
|
|
1601
|
+
* @param {number} [limit] Number of records to return. Default is 100; max is 1000.
|
|
1602
|
+
* @param {number} [startTimeAtMillis] The timestamp specifies the earliest point in time for which data should be returned. The value is not included.
|
|
1603
|
+
* @param {number} [endTimeAtMillis] The timestamp specifies the latest point in time for which data should be returned. The value is included.
|
|
1604
|
+
* @param {number} [page] The page number to retrieve in a paginated response.
|
|
1605
|
+
* @param {*} [options] Override http request option.
|
|
1606
|
+
* @throws {RequiredError}
|
|
1607
|
+
*/
|
|
1608
|
+
getFundingRateHistory: (symbol_1, limit_1, startTimeAtMillis_1, endTimeAtMillis_1, page_1, ...args_1) => __awaiter(this, [symbol_1, limit_1, startTimeAtMillis_1, endTimeAtMillis_1, page_1, ...args_1], void 0, function* (symbol, limit, startTimeAtMillis, endTimeAtMillis, page, options = {}) {
|
|
1609
|
+
// verify required parameter 'symbol' is not null or undefined
|
|
1610
|
+
(0, common_1.assertParamExists)('getFundingRateHistory', 'symbol', symbol);
|
|
1611
|
+
const localVarPath = `/v1/exchange/fundingRateHistory`;
|
|
1612
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1613
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1614
|
+
let baseOptions;
|
|
1615
|
+
if (configuration) {
|
|
1616
|
+
baseOptions = configuration.baseOptions;
|
|
1617
|
+
}
|
|
1618
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1619
|
+
const localVarHeaderParameter = {};
|
|
1620
|
+
const localVarQueryParameter = {};
|
|
1621
|
+
if (symbol !== undefined) {
|
|
1622
|
+
localVarQueryParameter['symbol'] = symbol;
|
|
1623
|
+
}
|
|
1624
|
+
if (limit !== undefined) {
|
|
1625
|
+
localVarQueryParameter['limit'] = limit;
|
|
1626
|
+
}
|
|
1627
|
+
if (startTimeAtMillis !== undefined) {
|
|
1628
|
+
localVarQueryParameter['startTimeAtMillis'] = startTimeAtMillis;
|
|
1629
|
+
}
|
|
1630
|
+
if (endTimeAtMillis !== undefined) {
|
|
1631
|
+
localVarQueryParameter['endTimeAtMillis'] = endTimeAtMillis;
|
|
1632
|
+
}
|
|
1633
|
+
if (page !== undefined) {
|
|
1634
|
+
localVarQueryParameter['page'] = page;
|
|
1635
|
+
}
|
|
1636
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1637
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1638
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1639
|
+
return {
|
|
1640
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1641
|
+
options: localVarRequestOptions,
|
|
1642
|
+
};
|
|
1643
|
+
}),
|
|
1644
|
+
/**
|
|
1645
|
+
* Retrieves aggregated ticker data for a market.
|
|
1646
|
+
* @summary /exchange/ticker
|
|
1647
|
+
* @param {string} symbol Market symbol.
|
|
1648
|
+
* @param {*} [options] Override http request option.
|
|
1649
|
+
* @throws {RequiredError}
|
|
1650
|
+
*/
|
|
1651
|
+
getMarketTicker: (symbol_1, ...args_1) => __awaiter(this, [symbol_1, ...args_1], void 0, function* (symbol, options = {}) {
|
|
1652
|
+
// verify required parameter 'symbol' is not null or undefined
|
|
1653
|
+
(0, common_1.assertParamExists)('getMarketTicker', 'symbol', symbol);
|
|
1654
|
+
const localVarPath = `/v1/exchange/ticker`;
|
|
1655
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1656
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1657
|
+
let baseOptions;
|
|
1658
|
+
if (configuration) {
|
|
1659
|
+
baseOptions = configuration.baseOptions;
|
|
1660
|
+
}
|
|
1661
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1662
|
+
const localVarHeaderParameter = {};
|
|
1663
|
+
const localVarQueryParameter = {};
|
|
1664
|
+
if (symbol !== undefined) {
|
|
1665
|
+
localVarQueryParameter['symbol'] = symbol;
|
|
1666
|
+
}
|
|
1667
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1668
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1669
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1670
|
+
return {
|
|
1671
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1672
|
+
options: localVarRequestOptions,
|
|
1673
|
+
};
|
|
1674
|
+
}),
|
|
1675
|
+
/**
|
|
1676
|
+
* Returns the current state of the orderbook.
|
|
1677
|
+
* @summary /exchange/depth
|
|
1678
|
+
* @param {string} symbol Market symbol to get the orderbook depth for.
|
|
1679
|
+
* @param {number} [limit] Maximum number of bids and asks to return. Default 500; max 1000.
|
|
1680
|
+
* @param {*} [options] Override http request option.
|
|
1681
|
+
* @throws {RequiredError}
|
|
1682
|
+
*/
|
|
1683
|
+
getOrderbookDepth: (symbol_1, limit_1, ...args_1) => __awaiter(this, [symbol_1, limit_1, ...args_1], void 0, function* (symbol, limit, options = {}) {
|
|
1684
|
+
// verify required parameter 'symbol' is not null or undefined
|
|
1685
|
+
(0, common_1.assertParamExists)('getOrderbookDepth', 'symbol', symbol);
|
|
1686
|
+
const localVarPath = `/v1/exchange/depth`;
|
|
1687
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1688
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1689
|
+
let baseOptions;
|
|
1690
|
+
if (configuration) {
|
|
1691
|
+
baseOptions = configuration.baseOptions;
|
|
1692
|
+
}
|
|
1693
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1694
|
+
const localVarHeaderParameter = {};
|
|
1695
|
+
const localVarQueryParameter = {};
|
|
1696
|
+
if (symbol !== undefined) {
|
|
1697
|
+
localVarQueryParameter['symbol'] = symbol;
|
|
1698
|
+
}
|
|
1699
|
+
if (limit !== undefined) {
|
|
1700
|
+
localVarQueryParameter['limit'] = limit;
|
|
1701
|
+
}
|
|
1702
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1703
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1704
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1705
|
+
return {
|
|
1706
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1707
|
+
options: localVarRequestOptions,
|
|
1708
|
+
};
|
|
1709
|
+
}),
|
|
1710
|
+
/**
|
|
1711
|
+
* Retrieves recent trades executed on a market.
|
|
1712
|
+
* @summary /exchange/trades
|
|
1713
|
+
* @param {string} symbol The market symbol to get the trades for.
|
|
1714
|
+
* @param {TradeType} [tradeType] Type of trade.
|
|
1715
|
+
* @param {number} [limit] Default 500; max 1000.
|
|
1716
|
+
* @param {number} [startTimeAtMillis] The timestamp specifies the earliest point in time for which data should be returned. The value is not included.
|
|
1717
|
+
* @param {number} [endTimeAtMillis] The timestamp specifies the latest point in time for which data should be returned. The value is included.
|
|
1718
|
+
* @param {number} [page] The page number to retrieve in a paginated response.
|
|
1719
|
+
* @param {*} [options] Override http request option.
|
|
1720
|
+
* @throws {RequiredError}
|
|
1721
|
+
*/
|
|
1722
|
+
getRecentTrades: (symbol_1, tradeType_1, limit_1, startTimeAtMillis_1, endTimeAtMillis_1, page_1, ...args_1) => __awaiter(this, [symbol_1, tradeType_1, limit_1, startTimeAtMillis_1, endTimeAtMillis_1, page_1, ...args_1], void 0, function* (symbol, tradeType, limit, startTimeAtMillis, endTimeAtMillis, page, options = {}) {
|
|
1723
|
+
// verify required parameter 'symbol' is not null or undefined
|
|
1724
|
+
(0, common_1.assertParamExists)('getRecentTrades', 'symbol', symbol);
|
|
1725
|
+
const localVarPath = `/v1/exchange/trades`;
|
|
1726
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1727
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1728
|
+
let baseOptions;
|
|
1729
|
+
if (configuration) {
|
|
1730
|
+
baseOptions = configuration.baseOptions;
|
|
1731
|
+
}
|
|
1732
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1733
|
+
const localVarHeaderParameter = {};
|
|
1734
|
+
const localVarQueryParameter = {};
|
|
1735
|
+
if (symbol !== undefined) {
|
|
1736
|
+
localVarQueryParameter['symbol'] = symbol;
|
|
1737
|
+
}
|
|
1738
|
+
if (tradeType !== undefined) {
|
|
1739
|
+
localVarQueryParameter['tradeType'] = tradeType;
|
|
1740
|
+
}
|
|
1741
|
+
if (limit !== undefined) {
|
|
1742
|
+
localVarQueryParameter['limit'] = limit;
|
|
1743
|
+
}
|
|
1744
|
+
if (startTimeAtMillis !== undefined) {
|
|
1745
|
+
localVarQueryParameter['startTimeAtMillis'] = startTimeAtMillis;
|
|
1746
|
+
}
|
|
1747
|
+
if (endTimeAtMillis !== undefined) {
|
|
1748
|
+
localVarQueryParameter['endTimeAtMillis'] = endTimeAtMillis;
|
|
1749
|
+
}
|
|
1750
|
+
if (page !== undefined) {
|
|
1751
|
+
localVarQueryParameter['page'] = page;
|
|
1752
|
+
}
|
|
1753
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1754
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1755
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1756
|
+
return {
|
|
1757
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1758
|
+
options: localVarRequestOptions,
|
|
1759
|
+
};
|
|
1760
|
+
}),
|
|
1761
|
+
};
|
|
1762
|
+
};
|
|
1763
|
+
exports.ExchangeApiAxiosParamCreator = ExchangeApiAxiosParamCreator;
|
|
1764
|
+
/**
|
|
1765
|
+
* ExchangeApi - functional programming interface
|
|
1766
|
+
* @export
|
|
1767
|
+
*/
|
|
1768
|
+
const ExchangeApiFp = function (configuration) {
|
|
1769
|
+
const localVarAxiosParamCreator = (0, exports.ExchangeApiAxiosParamCreator)(configuration);
|
|
1770
|
+
return {
|
|
1771
|
+
/**
|
|
1772
|
+
* Retrieves all market ticker information.
|
|
1773
|
+
* @summary /exchange/tickers
|
|
1774
|
+
* @param {*} [options] Override http request option.
|
|
1775
|
+
* @throws {RequiredError}
|
|
1776
|
+
*/
|
|
1777
|
+
getAllMarketTicker(options) {
|
|
1778
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1779
|
+
var _a, _b, _c;
|
|
1780
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAllMarketTicker(options);
|
|
1781
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1782
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ExchangeApi.getAllMarketTicker']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1783
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1784
|
+
});
|
|
1785
|
+
},
|
|
1786
|
+
/**
|
|
1787
|
+
* Retrieves candle stick data for a market.
|
|
1788
|
+
* @summary /exchange/candlesticks
|
|
1789
|
+
* @param {string} symbol The market symbol to get the klines for.
|
|
1790
|
+
* @param {KlineInterval} interval The interval to get the klines for.
|
|
1791
|
+
* @param {CandlePriceType} type Candle price type (last price, market price or oracle).
|
|
1792
|
+
* @param {number} [startTimeAtMillis] Timestamp in milliseconds in ms to get klines from.
|
|
1793
|
+
* @param {number} [endTimeAtMillis] Timestamp in milliseconds in ms to get klines until.
|
|
1794
|
+
* @param {number} [limit] Default 50; max 1000.
|
|
1795
|
+
* @param {number} [page] The page number to retrieve in a paginated response.
|
|
1796
|
+
* @param {*} [options] Override http request option.
|
|
1797
|
+
* @throws {RequiredError}
|
|
1798
|
+
*/
|
|
1799
|
+
getCandlestickData(symbol, interval, type, startTimeAtMillis, endTimeAtMillis, limit, page, options) {
|
|
1800
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1801
|
+
var _a, _b, _c;
|
|
1802
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getCandlestickData(symbol, interval, type, startTimeAtMillis, endTimeAtMillis, limit, page, options);
|
|
1803
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1804
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ExchangeApi.getCandlestickData']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1805
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1806
|
+
});
|
|
1807
|
+
},
|
|
1808
|
+
/**
|
|
1809
|
+
* Returns the current exchange information including available margin assets, markets, and rules.
|
|
1810
|
+
* @summary /exchange/info
|
|
1811
|
+
* @param {*} [options] Override http request option.
|
|
1812
|
+
* @throws {RequiredError}
|
|
1813
|
+
*/
|
|
1814
|
+
getExchangeInfo(options) {
|
|
1815
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1816
|
+
var _a, _b, _c;
|
|
1817
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getExchangeInfo(options);
|
|
1818
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1819
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ExchangeApi.getExchangeInfo']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1820
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1821
|
+
});
|
|
1822
|
+
},
|
|
1823
|
+
/**
|
|
1824
|
+
* Retrieves exchange statistics.
|
|
1825
|
+
* @summary /exchange/stats
|
|
1826
|
+
* @param {StatsInterval} [interval]
|
|
1827
|
+
* @param {number} [startTimeAtMillis] Timestamp in milliseconds.
|
|
1828
|
+
* @param {number} [endTimeAtMillis] Timestamp in milliseconds.
|
|
1829
|
+
* @param {number} [limit] Number of records to return. Default is 30; max is 200.
|
|
1830
|
+
* @param {number} [page] The page number to retrieve in a paginated response.
|
|
1831
|
+
* @param {*} [options] Override http request option.
|
|
1832
|
+
* @throws {RequiredError}
|
|
1833
|
+
*/
|
|
1834
|
+
getExchangeStats(interval, startTimeAtMillis, endTimeAtMillis, limit, page, options) {
|
|
1835
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1836
|
+
var _a, _b, _c;
|
|
1837
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getExchangeStats(interval, startTimeAtMillis, endTimeAtMillis, limit, page, options);
|
|
1838
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1839
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ExchangeApi.getExchangeStats']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1840
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1841
|
+
});
|
|
1842
|
+
},
|
|
1843
|
+
/**
|
|
1844
|
+
* Retrieve the funding rate history for a specific market address.
|
|
1845
|
+
* @summary /exchange/fundingRateHistory
|
|
1846
|
+
* @param {string} symbol The market symbol to get funding rate history for
|
|
1847
|
+
* @param {number} [limit] Number of records to return. Default is 100; max is 1000.
|
|
1848
|
+
* @param {number} [startTimeAtMillis] The timestamp specifies the earliest point in time for which data should be returned. The value is not included.
|
|
1849
|
+
* @param {number} [endTimeAtMillis] The timestamp specifies the latest point in time for which data should be returned. The value is included.
|
|
1850
|
+
* @param {number} [page] The page number to retrieve in a paginated response.
|
|
1851
|
+
* @param {*} [options] Override http request option.
|
|
1852
|
+
* @throws {RequiredError}
|
|
1853
|
+
*/
|
|
1854
|
+
getFundingRateHistory(symbol, limit, startTimeAtMillis, endTimeAtMillis, page, options) {
|
|
1855
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1856
|
+
var _a, _b, _c;
|
|
1857
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getFundingRateHistory(symbol, limit, startTimeAtMillis, endTimeAtMillis, page, options);
|
|
1858
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1859
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ExchangeApi.getFundingRateHistory']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1860
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1861
|
+
});
|
|
1862
|
+
},
|
|
1863
|
+
/**
|
|
1864
|
+
* Retrieves aggregated ticker data for a market.
|
|
1865
|
+
* @summary /exchange/ticker
|
|
1866
|
+
* @param {string} symbol Market symbol.
|
|
1867
|
+
* @param {*} [options] Override http request option.
|
|
1868
|
+
* @throws {RequiredError}
|
|
1869
|
+
*/
|
|
1870
|
+
getMarketTicker(symbol, options) {
|
|
1871
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1872
|
+
var _a, _b, _c;
|
|
1873
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getMarketTicker(symbol, options);
|
|
1874
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1875
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ExchangeApi.getMarketTicker']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1876
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1877
|
+
});
|
|
1878
|
+
},
|
|
1879
|
+
/**
|
|
1880
|
+
* Returns the current state of the orderbook.
|
|
1881
|
+
* @summary /exchange/depth
|
|
1882
|
+
* @param {string} symbol Market symbol to get the orderbook depth for.
|
|
1883
|
+
* @param {number} [limit] Maximum number of bids and asks to return. Default 500; max 1000.
|
|
1884
|
+
* @param {*} [options] Override http request option.
|
|
1885
|
+
* @throws {RequiredError}
|
|
1886
|
+
*/
|
|
1887
|
+
getOrderbookDepth(symbol, limit, options) {
|
|
1888
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1889
|
+
var _a, _b, _c;
|
|
1890
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getOrderbookDepth(symbol, limit, options);
|
|
1891
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1892
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ExchangeApi.getOrderbookDepth']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1893
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1894
|
+
});
|
|
1895
|
+
},
|
|
1896
|
+
/**
|
|
1897
|
+
* Retrieves recent trades executed on a market.
|
|
1898
|
+
* @summary /exchange/trades
|
|
1899
|
+
* @param {string} symbol The market symbol to get the trades for.
|
|
1900
|
+
* @param {TradeType} [tradeType] Type of trade.
|
|
1901
|
+
* @param {number} [limit] Default 500; max 1000.
|
|
1902
|
+
* @param {number} [startTimeAtMillis] The timestamp specifies the earliest point in time for which data should be returned. The value is not included.
|
|
1903
|
+
* @param {number} [endTimeAtMillis] The timestamp specifies the latest point in time for which data should be returned. The value is included.
|
|
1904
|
+
* @param {number} [page] The page number to retrieve in a paginated response.
|
|
1905
|
+
* @param {*} [options] Override http request option.
|
|
1906
|
+
* @throws {RequiredError}
|
|
1907
|
+
*/
|
|
1908
|
+
getRecentTrades(symbol, tradeType, limit, startTimeAtMillis, endTimeAtMillis, page, options) {
|
|
1909
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1910
|
+
var _a, _b, _c;
|
|
1911
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getRecentTrades(symbol, tradeType, limit, startTimeAtMillis, endTimeAtMillis, page, options);
|
|
1912
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1913
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ExchangeApi.getRecentTrades']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1914
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1915
|
+
});
|
|
1916
|
+
},
|
|
1917
|
+
};
|
|
1918
|
+
};
|
|
1919
|
+
exports.ExchangeApiFp = ExchangeApiFp;
|
|
1920
|
+
/**
|
|
1921
|
+
* ExchangeApi - factory interface
|
|
1922
|
+
* @export
|
|
1923
|
+
*/
|
|
1924
|
+
const ExchangeApiFactory = function (configuration, basePath, axios) {
|
|
1925
|
+
const localVarFp = (0, exports.ExchangeApiFp)(configuration);
|
|
1926
|
+
return {
|
|
1927
|
+
/**
|
|
1928
|
+
* Retrieves all market ticker information.
|
|
1929
|
+
* @summary /exchange/tickers
|
|
1930
|
+
* @param {*} [options] Override http request option.
|
|
1931
|
+
* @throws {RequiredError}
|
|
1932
|
+
*/
|
|
1933
|
+
getAllMarketTicker(options) {
|
|
1934
|
+
return localVarFp.getAllMarketTicker(options).then((request) => request(axios, basePath));
|
|
1935
|
+
},
|
|
1936
|
+
/**
|
|
1937
|
+
* Retrieves candle stick data for a market.
|
|
1938
|
+
* @summary /exchange/candlesticks
|
|
1939
|
+
* @param {string} symbol The market symbol to get the klines for.
|
|
1940
|
+
* @param {KlineInterval} interval The interval to get the klines for.
|
|
1941
|
+
* @param {CandlePriceType} type Candle price type (last price, market price or oracle).
|
|
1942
|
+
* @param {number} [startTimeAtMillis] Timestamp in milliseconds in ms to get klines from.
|
|
1943
|
+
* @param {number} [endTimeAtMillis] Timestamp in milliseconds in ms to get klines until.
|
|
1944
|
+
* @param {number} [limit] Default 50; max 1000.
|
|
1945
|
+
* @param {number} [page] The page number to retrieve in a paginated response.
|
|
1946
|
+
* @param {*} [options] Override http request option.
|
|
1947
|
+
* @throws {RequiredError}
|
|
1948
|
+
*/
|
|
1949
|
+
getCandlestickData(symbol, interval, type, startTimeAtMillis, endTimeAtMillis, limit, page, options) {
|
|
1950
|
+
return localVarFp.getCandlestickData(symbol, interval, type, startTimeAtMillis, endTimeAtMillis, limit, page, options).then((request) => request(axios, basePath));
|
|
1951
|
+
},
|
|
1952
|
+
/**
|
|
1953
|
+
* Returns the current exchange information including available margin assets, markets, and rules.
|
|
1954
|
+
* @summary /exchange/info
|
|
1955
|
+
* @param {*} [options] Override http request option.
|
|
1956
|
+
* @throws {RequiredError}
|
|
1957
|
+
*/
|
|
1958
|
+
getExchangeInfo(options) {
|
|
1959
|
+
return localVarFp.getExchangeInfo(options).then((request) => request(axios, basePath));
|
|
1960
|
+
},
|
|
1961
|
+
/**
|
|
1962
|
+
* Retrieves exchange statistics.
|
|
1963
|
+
* @summary /exchange/stats
|
|
1964
|
+
* @param {StatsInterval} [interval]
|
|
1965
|
+
* @param {number} [startTimeAtMillis] Timestamp in milliseconds.
|
|
1966
|
+
* @param {number} [endTimeAtMillis] Timestamp in milliseconds.
|
|
1967
|
+
* @param {number} [limit] Number of records to return. Default is 30; max is 200.
|
|
1968
|
+
* @param {number} [page] The page number to retrieve in a paginated response.
|
|
1969
|
+
* @param {*} [options] Override http request option.
|
|
1970
|
+
* @throws {RequiredError}
|
|
1971
|
+
*/
|
|
1972
|
+
getExchangeStats(interval, startTimeAtMillis, endTimeAtMillis, limit, page, options) {
|
|
1973
|
+
return localVarFp.getExchangeStats(interval, startTimeAtMillis, endTimeAtMillis, limit, page, options).then((request) => request(axios, basePath));
|
|
1974
|
+
},
|
|
1975
|
+
/**
|
|
1976
|
+
* Retrieve the funding rate history for a specific market address.
|
|
1977
|
+
* @summary /exchange/fundingRateHistory
|
|
1978
|
+
* @param {string} symbol The market symbol to get funding rate history for
|
|
1979
|
+
* @param {number} [limit] Number of records to return. Default is 100; max is 1000.
|
|
1980
|
+
* @param {number} [startTimeAtMillis] The timestamp specifies the earliest point in time for which data should be returned. The value is not included.
|
|
1981
|
+
* @param {number} [endTimeAtMillis] The timestamp specifies the latest point in time for which data should be returned. The value is included.
|
|
1982
|
+
* @param {number} [page] The page number to retrieve in a paginated response.
|
|
1983
|
+
* @param {*} [options] Override http request option.
|
|
1984
|
+
* @throws {RequiredError}
|
|
1985
|
+
*/
|
|
1986
|
+
getFundingRateHistory(symbol, limit, startTimeAtMillis, endTimeAtMillis, page, options) {
|
|
1987
|
+
return localVarFp.getFundingRateHistory(symbol, limit, startTimeAtMillis, endTimeAtMillis, page, options).then((request) => request(axios, basePath));
|
|
1988
|
+
},
|
|
1989
|
+
/**
|
|
1990
|
+
* Retrieves aggregated ticker data for a market.
|
|
1991
|
+
* @summary /exchange/ticker
|
|
1992
|
+
* @param {string} symbol Market symbol.
|
|
1993
|
+
* @param {*} [options] Override http request option.
|
|
1994
|
+
* @throws {RequiredError}
|
|
1995
|
+
*/
|
|
1996
|
+
getMarketTicker(symbol, options) {
|
|
1997
|
+
return localVarFp.getMarketTicker(symbol, options).then((request) => request(axios, basePath));
|
|
1998
|
+
},
|
|
1999
|
+
/**
|
|
2000
|
+
* Returns the current state of the orderbook.
|
|
2001
|
+
* @summary /exchange/depth
|
|
2002
|
+
* @param {string} symbol Market symbol to get the orderbook depth for.
|
|
2003
|
+
* @param {number} [limit] Maximum number of bids and asks to return. Default 500; max 1000.
|
|
2004
|
+
* @param {*} [options] Override http request option.
|
|
2005
|
+
* @throws {RequiredError}
|
|
2006
|
+
*/
|
|
2007
|
+
getOrderbookDepth(symbol, limit, options) {
|
|
2008
|
+
return localVarFp.getOrderbookDepth(symbol, limit, options).then((request) => request(axios, basePath));
|
|
2009
|
+
},
|
|
2010
|
+
/**
|
|
2011
|
+
* Retrieves recent trades executed on a market.
|
|
2012
|
+
* @summary /exchange/trades
|
|
2013
|
+
* @param {string} symbol The market symbol to get the trades for.
|
|
2014
|
+
* @param {TradeType} [tradeType] Type of trade.
|
|
2015
|
+
* @param {number} [limit] Default 500; max 1000.
|
|
2016
|
+
* @param {number} [startTimeAtMillis] The timestamp specifies the earliest point in time for which data should be returned. The value is not included.
|
|
2017
|
+
* @param {number} [endTimeAtMillis] The timestamp specifies the latest point in time for which data should be returned. The value is included.
|
|
2018
|
+
* @param {number} [page] The page number to retrieve in a paginated response.
|
|
2019
|
+
* @param {*} [options] Override http request option.
|
|
2020
|
+
* @throws {RequiredError}
|
|
2021
|
+
*/
|
|
2022
|
+
getRecentTrades(symbol, tradeType, limit, startTimeAtMillis, endTimeAtMillis, page, options) {
|
|
2023
|
+
return localVarFp.getRecentTrades(symbol, tradeType, limit, startTimeAtMillis, endTimeAtMillis, page, options).then((request) => request(axios, basePath));
|
|
2024
|
+
},
|
|
2025
|
+
};
|
|
2026
|
+
};
|
|
2027
|
+
exports.ExchangeApiFactory = ExchangeApiFactory;
|
|
2028
|
+
/**
|
|
2029
|
+
* ExchangeApi - object-oriented interface
|
|
2030
|
+
* @export
|
|
2031
|
+
* @class ExchangeApi
|
|
2032
|
+
* @extends {BaseAPI}
|
|
2033
|
+
*/
|
|
2034
|
+
class ExchangeApi extends base_1.BaseAPI {
|
|
2035
|
+
/**
|
|
2036
|
+
* Retrieves all market ticker information.
|
|
2037
|
+
* @summary /exchange/tickers
|
|
2038
|
+
* @param {*} [options] Override http request option.
|
|
2039
|
+
* @throws {RequiredError}
|
|
2040
|
+
* @memberof ExchangeApi
|
|
2041
|
+
*/
|
|
2042
|
+
getAllMarketTicker(options) {
|
|
2043
|
+
return (0, exports.ExchangeApiFp)(this.configuration).getAllMarketTicker(options).then((request) => request(this.axios, this.basePath));
|
|
2044
|
+
}
|
|
2045
|
+
/**
|
|
2046
|
+
* Retrieves candle stick data for a market.
|
|
2047
|
+
* @summary /exchange/candlesticks
|
|
2048
|
+
* @param {string} symbol The market symbol to get the klines for.
|
|
2049
|
+
* @param {KlineInterval} interval The interval to get the klines for.
|
|
2050
|
+
* @param {CandlePriceType} type Candle price type (last price, market price or oracle).
|
|
2051
|
+
* @param {number} [startTimeAtMillis] Timestamp in milliseconds in ms to get klines from.
|
|
2052
|
+
* @param {number} [endTimeAtMillis] Timestamp in milliseconds in ms to get klines until.
|
|
2053
|
+
* @param {number} [limit] Default 50; max 1000.
|
|
2054
|
+
* @param {number} [page] The page number to retrieve in a paginated response.
|
|
2055
|
+
* @param {*} [options] Override http request option.
|
|
2056
|
+
* @throws {RequiredError}
|
|
2057
|
+
* @memberof ExchangeApi
|
|
2058
|
+
*/
|
|
2059
|
+
getCandlestickData(symbol, interval, type, startTimeAtMillis, endTimeAtMillis, limit, page, options) {
|
|
2060
|
+
return (0, exports.ExchangeApiFp)(this.configuration).getCandlestickData(symbol, interval, type, startTimeAtMillis, endTimeAtMillis, limit, page, options).then((request) => request(this.axios, this.basePath));
|
|
2061
|
+
}
|
|
2062
|
+
/**
|
|
2063
|
+
* Returns the current exchange information including available margin assets, markets, and rules.
|
|
2064
|
+
* @summary /exchange/info
|
|
2065
|
+
* @param {*} [options] Override http request option.
|
|
2066
|
+
* @throws {RequiredError}
|
|
2067
|
+
* @memberof ExchangeApi
|
|
2068
|
+
*/
|
|
2069
|
+
getExchangeInfo(options) {
|
|
2070
|
+
return (0, exports.ExchangeApiFp)(this.configuration).getExchangeInfo(options).then((request) => request(this.axios, this.basePath));
|
|
2071
|
+
}
|
|
2072
|
+
/**
|
|
2073
|
+
* Retrieves exchange statistics.
|
|
2074
|
+
* @summary /exchange/stats
|
|
2075
|
+
* @param {StatsInterval} [interval]
|
|
2076
|
+
* @param {number} [startTimeAtMillis] Timestamp in milliseconds.
|
|
2077
|
+
* @param {number} [endTimeAtMillis] Timestamp in milliseconds.
|
|
2078
|
+
* @param {number} [limit] Number of records to return. Default is 30; max is 200.
|
|
2079
|
+
* @param {number} [page] The page number to retrieve in a paginated response.
|
|
2080
|
+
* @param {*} [options] Override http request option.
|
|
2081
|
+
* @throws {RequiredError}
|
|
2082
|
+
* @memberof ExchangeApi
|
|
2083
|
+
*/
|
|
2084
|
+
getExchangeStats(interval, startTimeAtMillis, endTimeAtMillis, limit, page, options) {
|
|
2085
|
+
return (0, exports.ExchangeApiFp)(this.configuration).getExchangeStats(interval, startTimeAtMillis, endTimeAtMillis, limit, page, options).then((request) => request(this.axios, this.basePath));
|
|
2086
|
+
}
|
|
2087
|
+
/**
|
|
2088
|
+
* Retrieve the funding rate history for a specific market address.
|
|
2089
|
+
* @summary /exchange/fundingRateHistory
|
|
2090
|
+
* @param {string} symbol The market symbol to get funding rate history for
|
|
2091
|
+
* @param {number} [limit] Number of records to return. Default is 100; max is 1000.
|
|
2092
|
+
* @param {number} [startTimeAtMillis] The timestamp specifies the earliest point in time for which data should be returned. The value is not included.
|
|
2093
|
+
* @param {number} [endTimeAtMillis] The timestamp specifies the latest point in time for which data should be returned. The value is included.
|
|
2094
|
+
* @param {number} [page] The page number to retrieve in a paginated response.
|
|
2095
|
+
* @param {*} [options] Override http request option.
|
|
2096
|
+
* @throws {RequiredError}
|
|
2097
|
+
* @memberof ExchangeApi
|
|
2098
|
+
*/
|
|
2099
|
+
getFundingRateHistory(symbol, limit, startTimeAtMillis, endTimeAtMillis, page, options) {
|
|
2100
|
+
return (0, exports.ExchangeApiFp)(this.configuration).getFundingRateHistory(symbol, limit, startTimeAtMillis, endTimeAtMillis, page, options).then((request) => request(this.axios, this.basePath));
|
|
2101
|
+
}
|
|
2102
|
+
/**
|
|
2103
|
+
* Retrieves aggregated ticker data for a market.
|
|
2104
|
+
* @summary /exchange/ticker
|
|
2105
|
+
* @param {string} symbol Market symbol.
|
|
2106
|
+
* @param {*} [options] Override http request option.
|
|
2107
|
+
* @throws {RequiredError}
|
|
2108
|
+
* @memberof ExchangeApi
|
|
2109
|
+
*/
|
|
2110
|
+
getMarketTicker(symbol, options) {
|
|
2111
|
+
return (0, exports.ExchangeApiFp)(this.configuration).getMarketTicker(symbol, options).then((request) => request(this.axios, this.basePath));
|
|
2112
|
+
}
|
|
2113
|
+
/**
|
|
2114
|
+
* Returns the current state of the orderbook.
|
|
2115
|
+
* @summary /exchange/depth
|
|
2116
|
+
* @param {string} symbol Market symbol to get the orderbook depth for.
|
|
2117
|
+
* @param {number} [limit] Maximum number of bids and asks to return. Default 500; max 1000.
|
|
2118
|
+
* @param {*} [options] Override http request option.
|
|
2119
|
+
* @throws {RequiredError}
|
|
2120
|
+
* @memberof ExchangeApi
|
|
2121
|
+
*/
|
|
2122
|
+
getOrderbookDepth(symbol, limit, options) {
|
|
2123
|
+
return (0, exports.ExchangeApiFp)(this.configuration).getOrderbookDepth(symbol, limit, options).then((request) => request(this.axios, this.basePath));
|
|
2124
|
+
}
|
|
2125
|
+
/**
|
|
2126
|
+
* Retrieves recent trades executed on a market.
|
|
2127
|
+
* @summary /exchange/trades
|
|
2128
|
+
* @param {string} symbol The market symbol to get the trades for.
|
|
2129
|
+
* @param {TradeType} [tradeType] Type of trade.
|
|
2130
|
+
* @param {number} [limit] Default 500; max 1000.
|
|
2131
|
+
* @param {number} [startTimeAtMillis] The timestamp specifies the earliest point in time for which data should be returned. The value is not included.
|
|
2132
|
+
* @param {number} [endTimeAtMillis] The timestamp specifies the latest point in time for which data should be returned. The value is included.
|
|
2133
|
+
* @param {number} [page] The page number to retrieve in a paginated response.
|
|
2134
|
+
* @param {*} [options] Override http request option.
|
|
2135
|
+
* @throws {RequiredError}
|
|
2136
|
+
* @memberof ExchangeApi
|
|
2137
|
+
*/
|
|
2138
|
+
getRecentTrades(symbol, tradeType, limit, startTimeAtMillis, endTimeAtMillis, page, options) {
|
|
2139
|
+
return (0, exports.ExchangeApiFp)(this.configuration).getRecentTrades(symbol, tradeType, limit, startTimeAtMillis, endTimeAtMillis, page, options).then((request) => request(this.axios, this.basePath));
|
|
2140
|
+
}
|
|
2141
|
+
}
|
|
2142
|
+
exports.ExchangeApi = ExchangeApi;
|
|
2143
|
+
/**
|
|
2144
|
+
* RewardsApi - axios parameter creator
|
|
2145
|
+
* @export
|
|
2146
|
+
*/
|
|
2147
|
+
const RewardsApiAxiosParamCreator = function (configuration) {
|
|
2148
|
+
return {
|
|
2149
|
+
/**
|
|
2150
|
+
* Returns detailed earnings breakdown for an affiliate by interval, ordered by interval number in descending order.
|
|
2151
|
+
* @summary /rewards/affiliate/intervalOverview
|
|
2152
|
+
* @param {string} userAddress The address of the user to get interval overview for
|
|
2153
|
+
* @param {number} [page] The page number to retrieve in a paginated response
|
|
2154
|
+
* @param {number} [limit] The page size for pagination
|
|
2155
|
+
* @param {*} [options] Override http request option.
|
|
2156
|
+
* @throws {RequiredError}
|
|
2157
|
+
*/
|
|
2158
|
+
getAffiliateIntervalOverview: (userAddress_1, page_1, limit_1, ...args_1) => __awaiter(this, [userAddress_1, page_1, limit_1, ...args_1], void 0, function* (userAddress, page, limit, options = {}) {
|
|
2159
|
+
// verify required parameter 'userAddress' is not null or undefined
|
|
2160
|
+
(0, common_1.assertParamExists)('getAffiliateIntervalOverview', 'userAddress', userAddress);
|
|
2161
|
+
const localVarPath = `/v1/rewards/affiliate/intervalOverview`;
|
|
2162
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2163
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2164
|
+
let baseOptions;
|
|
2165
|
+
if (configuration) {
|
|
2166
|
+
baseOptions = configuration.baseOptions;
|
|
2167
|
+
}
|
|
2168
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2169
|
+
const localVarHeaderParameter = {};
|
|
2170
|
+
const localVarQueryParameter = {};
|
|
2171
|
+
if (userAddress !== undefined) {
|
|
2172
|
+
localVarQueryParameter['userAddress'] = userAddress;
|
|
2173
|
+
}
|
|
2174
|
+
if (page !== undefined) {
|
|
2175
|
+
localVarQueryParameter['page'] = page;
|
|
2176
|
+
}
|
|
2177
|
+
if (limit !== undefined) {
|
|
2178
|
+
localVarQueryParameter['limit'] = limit;
|
|
2179
|
+
}
|
|
2180
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2181
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2182
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2183
|
+
return {
|
|
2184
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2185
|
+
options: localVarRequestOptions,
|
|
2186
|
+
};
|
|
2187
|
+
}),
|
|
2188
|
+
/**
|
|
2189
|
+
* Returns rankings and earnings for affiliates, sorted by the specified category.
|
|
2190
|
+
* @summary /rewards/affiliate/leaderDashboard
|
|
2191
|
+
* @param {GetAffiliateLeaderDashboardSortByEnum} [sortBy] The category to sort rankings by
|
|
2192
|
+
* @param {GetAffiliateLeaderDashboardSortOrderEnum} [sortOrder] The order to sort rankings by
|
|
2193
|
+
* @param {number} [page] The page number to retrieve in a paginated response
|
|
2194
|
+
* @param {number} [limit] The page size for pagination
|
|
2195
|
+
* @param {string} [search] The name/address of the user to filter by
|
|
2196
|
+
* @param {*} [options] Override http request option.
|
|
2197
|
+
* @throws {RequiredError}
|
|
2198
|
+
*/
|
|
2199
|
+
getAffiliateLeaderDashboard: (sortBy_1, sortOrder_1, page_1, limit_1, search_1, ...args_1) => __awaiter(this, [sortBy_1, sortOrder_1, page_1, limit_1, search_1, ...args_1], void 0, function* (sortBy, sortOrder, page, limit, search, options = {}) {
|
|
2200
|
+
const localVarPath = `/v1/rewards/affiliate/leaderDashboard`;
|
|
2201
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2202
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2203
|
+
let baseOptions;
|
|
2204
|
+
if (configuration) {
|
|
2205
|
+
baseOptions = configuration.baseOptions;
|
|
2206
|
+
}
|
|
2207
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2208
|
+
const localVarHeaderParameter = {};
|
|
2209
|
+
const localVarQueryParameter = {};
|
|
2210
|
+
if (sortBy !== undefined) {
|
|
2211
|
+
localVarQueryParameter['sortBy'] = sortBy;
|
|
2212
|
+
}
|
|
2213
|
+
if (sortOrder !== undefined) {
|
|
2214
|
+
localVarQueryParameter['sortOrder'] = sortOrder;
|
|
2215
|
+
}
|
|
2216
|
+
if (page !== undefined) {
|
|
2217
|
+
localVarQueryParameter['page'] = page;
|
|
2218
|
+
}
|
|
2219
|
+
if (limit !== undefined) {
|
|
2220
|
+
localVarQueryParameter['limit'] = limit;
|
|
2221
|
+
}
|
|
2222
|
+
if (search !== undefined) {
|
|
2223
|
+
localVarQueryParameter['search'] = search;
|
|
2224
|
+
}
|
|
2225
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2226
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2227
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2228
|
+
return {
|
|
2229
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2230
|
+
options: localVarRequestOptions,
|
|
2231
|
+
};
|
|
2232
|
+
}),
|
|
2233
|
+
/**
|
|
2234
|
+
* Returns the affiliate metadata.
|
|
2235
|
+
* @summary /rewards/affiliate
|
|
2236
|
+
* @param {string} userAddress Specify wallet address.
|
|
2237
|
+
* @param {*} [options] Override http request option.
|
|
2238
|
+
* @throws {RequiredError}
|
|
2239
|
+
*/
|
|
2240
|
+
getAffiliateMetadata: (userAddress_1, ...args_1) => __awaiter(this, [userAddress_1, ...args_1], void 0, function* (userAddress, options = {}) {
|
|
2241
|
+
// verify required parameter 'userAddress' is not null or undefined
|
|
2242
|
+
(0, common_1.assertParamExists)('getAffiliateMetadata', 'userAddress', userAddress);
|
|
2243
|
+
const localVarPath = `/v1/rewards/affiliate`;
|
|
2244
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2245
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2246
|
+
let baseOptions;
|
|
2247
|
+
if (configuration) {
|
|
2248
|
+
baseOptions = configuration.baseOptions;
|
|
2249
|
+
}
|
|
2250
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2251
|
+
const localVarHeaderParameter = {};
|
|
2252
|
+
const localVarQueryParameter = {};
|
|
2253
|
+
if (userAddress !== undefined) {
|
|
2254
|
+
localVarQueryParameter['userAddress'] = userAddress;
|
|
2255
|
+
}
|
|
2256
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2257
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2258
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2259
|
+
return {
|
|
2260
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2261
|
+
options: localVarRequestOptions,
|
|
2262
|
+
};
|
|
2263
|
+
}),
|
|
2264
|
+
/**
|
|
2265
|
+
* Returns detailed earnings breakdown for an affiliate users earnings (including perps, spot LP, lending), referral earnings, and total earnings.
|
|
2266
|
+
* @summary /rewards/affiliate/overview
|
|
2267
|
+
* @param {string} userAddress Specify wallet address.
|
|
2268
|
+
* @param {number} [page] The page number to retrieve in a paginated response
|
|
2269
|
+
* @param {number} [limit] The page size for pagination
|
|
2270
|
+
* @param {GetAffiliateOverviewSortByEnum} [sortBy] The category to sort earnings by
|
|
2271
|
+
* @param {GetAffiliateOverviewSortOrderEnum} [sortOrder] The order to sort earnings by
|
|
2272
|
+
* @param {string} [search] The name/address of the user to filter by
|
|
2273
|
+
* @param {string} [minEarningsE9] The minimum earnings to filter by
|
|
2274
|
+
* @param {*} [options] Override http request option.
|
|
2275
|
+
* @throws {RequiredError}
|
|
2276
|
+
*/
|
|
2277
|
+
getAffiliateOverview: (userAddress_1, page_1, limit_1, sortBy_1, sortOrder_1, search_1, minEarningsE9_1, ...args_1) => __awaiter(this, [userAddress_1, page_1, limit_1, sortBy_1, sortOrder_1, search_1, minEarningsE9_1, ...args_1], void 0, function* (userAddress, page, limit, sortBy, sortOrder, search, minEarningsE9, options = {}) {
|
|
2278
|
+
// verify required parameter 'userAddress' is not null or undefined
|
|
2279
|
+
(0, common_1.assertParamExists)('getAffiliateOverview', 'userAddress', userAddress);
|
|
2280
|
+
const localVarPath = `/v1/rewards/affiliate/overview`;
|
|
2281
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2282
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2283
|
+
let baseOptions;
|
|
2284
|
+
if (configuration) {
|
|
2285
|
+
baseOptions = configuration.baseOptions;
|
|
2286
|
+
}
|
|
2287
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2288
|
+
const localVarHeaderParameter = {};
|
|
2289
|
+
const localVarQueryParameter = {};
|
|
2290
|
+
if (page !== undefined) {
|
|
2291
|
+
localVarQueryParameter['page'] = page;
|
|
2292
|
+
}
|
|
2293
|
+
if (limit !== undefined) {
|
|
2294
|
+
localVarQueryParameter['limit'] = limit;
|
|
2295
|
+
}
|
|
2296
|
+
if (sortBy !== undefined) {
|
|
2297
|
+
localVarQueryParameter['sortBy'] = sortBy;
|
|
2298
|
+
}
|
|
2299
|
+
if (sortOrder !== undefined) {
|
|
2300
|
+
localVarQueryParameter['sortOrder'] = sortOrder;
|
|
2301
|
+
}
|
|
2302
|
+
if (search !== undefined) {
|
|
2303
|
+
localVarQueryParameter['search'] = search;
|
|
2304
|
+
}
|
|
2305
|
+
if (userAddress !== undefined) {
|
|
2306
|
+
localVarQueryParameter['userAddress'] = userAddress;
|
|
2307
|
+
}
|
|
2308
|
+
if (minEarningsE9 !== undefined) {
|
|
2309
|
+
localVarQueryParameter['minEarningsE9'] = minEarningsE9;
|
|
2310
|
+
}
|
|
2311
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2312
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2313
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2314
|
+
return {
|
|
2315
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2316
|
+
options: localVarRequestOptions,
|
|
2317
|
+
};
|
|
2318
|
+
}),
|
|
2319
|
+
/**
|
|
2320
|
+
* Returns performance summary for an affiliate including total referrals, earnings, and rankings.
|
|
2321
|
+
* @summary /rewards/affiliate/summary
|
|
2322
|
+
* @param {string} userAddress Specify wallet address.
|
|
2323
|
+
* @param {*} [options] Override http request option.
|
|
2324
|
+
* @throws {RequiredError}
|
|
2325
|
+
*/
|
|
2326
|
+
getAffiliateSummary: (userAddress_1, ...args_1) => __awaiter(this, [userAddress_1, ...args_1], void 0, function* (userAddress, options = {}) {
|
|
2327
|
+
// verify required parameter 'userAddress' is not null or undefined
|
|
2328
|
+
(0, common_1.assertParamExists)('getAffiliateSummary', 'userAddress', userAddress);
|
|
2329
|
+
const localVarPath = `/v1/rewards/affiliate/summary`;
|
|
2330
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2331
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2332
|
+
let baseOptions;
|
|
2333
|
+
if (configuration) {
|
|
2334
|
+
baseOptions = configuration.baseOptions;
|
|
2335
|
+
}
|
|
2336
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2337
|
+
const localVarHeaderParameter = {};
|
|
2338
|
+
const localVarQueryParameter = {};
|
|
2339
|
+
if (userAddress !== undefined) {
|
|
2340
|
+
localVarQueryParameter['userAddress'] = userAddress;
|
|
2341
|
+
}
|
|
2342
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2343
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2344
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2345
|
+
return {
|
|
2346
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2347
|
+
options: localVarRequestOptions,
|
|
2348
|
+
};
|
|
2349
|
+
}),
|
|
2350
|
+
/**
|
|
2351
|
+
* Returns the rewards earned by users for a specific campaign.
|
|
2352
|
+
* @summary /rewards/campaign
|
|
2353
|
+
* @param {string} campaignName Specify the campaign name
|
|
2354
|
+
* @param {string} userAddress Specify wallet address.
|
|
2355
|
+
* @param {number} [epochNumber] Optionally specify epoch number.
|
|
2356
|
+
* @param {*} [options] Override http request option.
|
|
2357
|
+
* @throws {RequiredError}
|
|
2358
|
+
*/
|
|
2359
|
+
getCampaignRewards: (campaignName_1, userAddress_1, epochNumber_1, ...args_1) => __awaiter(this, [campaignName_1, userAddress_1, epochNumber_1, ...args_1], void 0, function* (campaignName, userAddress, epochNumber, options = {}) {
|
|
2360
|
+
// verify required parameter 'campaignName' is not null or undefined
|
|
2361
|
+
(0, common_1.assertParamExists)('getCampaignRewards', 'campaignName', campaignName);
|
|
2362
|
+
// verify required parameter 'userAddress' is not null or undefined
|
|
2363
|
+
(0, common_1.assertParamExists)('getCampaignRewards', 'userAddress', userAddress);
|
|
2364
|
+
const localVarPath = `/v1/rewards/campaign`;
|
|
2365
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2366
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2367
|
+
let baseOptions;
|
|
2368
|
+
if (configuration) {
|
|
2369
|
+
baseOptions = configuration.baseOptions;
|
|
2370
|
+
}
|
|
2371
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2372
|
+
const localVarHeaderParameter = {};
|
|
2373
|
+
const localVarQueryParameter = {};
|
|
2374
|
+
if (campaignName !== undefined) {
|
|
2375
|
+
localVarQueryParameter['campaignName'] = campaignName;
|
|
2376
|
+
}
|
|
2377
|
+
if (epochNumber !== undefined) {
|
|
2378
|
+
localVarQueryParameter['epochNumber'] = epochNumber;
|
|
2379
|
+
}
|
|
2380
|
+
if (userAddress !== undefined) {
|
|
2381
|
+
localVarQueryParameter['userAddress'] = userAddress;
|
|
2382
|
+
}
|
|
2383
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2384
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2385
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2386
|
+
return {
|
|
2387
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2388
|
+
options: localVarRequestOptions,
|
|
2389
|
+
};
|
|
2390
|
+
}),
|
|
2391
|
+
/**
|
|
2392
|
+
* Returns the rewards earned by users for the intervals.
|
|
2393
|
+
* @summary /rewards
|
|
2394
|
+
* @param {number} [intervalNumber] Optionally specify interval number.
|
|
2395
|
+
* @param {*} [options] Override http request option.
|
|
2396
|
+
* @throws {RequiredError}
|
|
2397
|
+
*/
|
|
2398
|
+
getRewards: (intervalNumber_1, ...args_1) => __awaiter(this, [intervalNumber_1, ...args_1], void 0, function* (intervalNumber, options = {}) {
|
|
2399
|
+
const localVarPath = `/v1/rewards`;
|
|
2400
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2401
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2402
|
+
let baseOptions;
|
|
2403
|
+
if (configuration) {
|
|
2404
|
+
baseOptions = configuration.baseOptions;
|
|
2405
|
+
}
|
|
2406
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2407
|
+
const localVarHeaderParameter = {};
|
|
2408
|
+
const localVarQueryParameter = {};
|
|
2409
|
+
// authentication bearerAuth required
|
|
2410
|
+
// http bearer authentication required
|
|
2411
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
2412
|
+
if (intervalNumber !== undefined) {
|
|
2413
|
+
localVarQueryParameter['intervalNumber'] = intervalNumber;
|
|
2414
|
+
}
|
|
2415
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2416
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2417
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2418
|
+
return {
|
|
2419
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2420
|
+
options: localVarRequestOptions,
|
|
2421
|
+
};
|
|
2422
|
+
}),
|
|
2423
|
+
/**
|
|
2424
|
+
* Returns the metadata for the rewards campaigns.
|
|
2425
|
+
* @summary /rewards/metadata/campaign
|
|
2426
|
+
* @param {string} [campaignName] Specify the campaign name
|
|
2427
|
+
* @param {GetRewardsCampaignMetadataStatusEnum} [status] Optionally specify the status of the campaigns.
|
|
2428
|
+
* @param {*} [options] Override http request option.
|
|
2429
|
+
* @throws {RequiredError}
|
|
2430
|
+
*/
|
|
2431
|
+
getRewardsCampaignMetadata: (campaignName_1, status_1, ...args_1) => __awaiter(this, [campaignName_1, status_1, ...args_1], void 0, function* (campaignName, status, options = {}) {
|
|
2432
|
+
const localVarPath = `/v1/rewards/metadata/campaign`;
|
|
2433
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2434
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2435
|
+
let baseOptions;
|
|
2436
|
+
if (configuration) {
|
|
2437
|
+
baseOptions = configuration.baseOptions;
|
|
2438
|
+
}
|
|
2439
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2440
|
+
const localVarHeaderParameter = {};
|
|
2441
|
+
const localVarQueryParameter = {};
|
|
2442
|
+
if (campaignName !== undefined) {
|
|
2443
|
+
localVarQueryParameter['campaignName'] = campaignName;
|
|
2444
|
+
}
|
|
2445
|
+
if (status !== undefined) {
|
|
2446
|
+
localVarQueryParameter['Status'] = status;
|
|
2447
|
+
}
|
|
2448
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2449
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2450
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2451
|
+
return {
|
|
2452
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2453
|
+
options: localVarRequestOptions,
|
|
2454
|
+
};
|
|
2455
|
+
}),
|
|
2456
|
+
/**
|
|
2457
|
+
* Returns the latest epoch configs for the campaigns.
|
|
2458
|
+
* @summary /rewards/metadata/epoch/configs
|
|
2459
|
+
* @param {number} [intervalNumber] Specify the interval number
|
|
2460
|
+
* @param {*} [options] Override http request option.
|
|
2461
|
+
* @throws {RequiredError}
|
|
2462
|
+
*/
|
|
2463
|
+
getRewardsEpochConfigMetadata: (intervalNumber_1, ...args_1) => __awaiter(this, [intervalNumber_1, ...args_1], void 0, function* (intervalNumber, options = {}) {
|
|
2464
|
+
const localVarPath = `/v1/rewards/metadata/epoch/configs`;
|
|
2465
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2466
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2467
|
+
let baseOptions;
|
|
2468
|
+
if (configuration) {
|
|
2469
|
+
baseOptions = configuration.baseOptions;
|
|
2470
|
+
}
|
|
2471
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2472
|
+
const localVarHeaderParameter = {};
|
|
2473
|
+
const localVarQueryParameter = {};
|
|
2474
|
+
if (intervalNumber !== undefined) {
|
|
2475
|
+
localVarQueryParameter['intervalNumber'] = intervalNumber;
|
|
2476
|
+
}
|
|
2477
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2478
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2479
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2480
|
+
return {
|
|
2481
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2482
|
+
options: localVarRequestOptions,
|
|
2483
|
+
};
|
|
2484
|
+
}),
|
|
2485
|
+
/**
|
|
2486
|
+
* Returns the latest or next epoch epoch for campaign.
|
|
2487
|
+
* @summary /rewards/metadata/epoch
|
|
2488
|
+
* @param {string} [campaignName] Specify the campaign name
|
|
2489
|
+
* @param {GetRewardsEpochMetadataEpochEnum} [epoch] Specify the string \"next\" or \"latest\".
|
|
2490
|
+
* @param {*} [options] Override http request option.
|
|
2491
|
+
* @throws {RequiredError}
|
|
2492
|
+
*/
|
|
2493
|
+
getRewardsEpochMetadata: (campaignName_1, epoch_1, ...args_1) => __awaiter(this, [campaignName_1, epoch_1, ...args_1], void 0, function* (campaignName, epoch, options = {}) {
|
|
2494
|
+
const localVarPath = `/v1/rewards/metadata/epoch`;
|
|
2495
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2496
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2497
|
+
let baseOptions;
|
|
2498
|
+
if (configuration) {
|
|
2499
|
+
baseOptions = configuration.baseOptions;
|
|
2500
|
+
}
|
|
2501
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2502
|
+
const localVarHeaderParameter = {};
|
|
2503
|
+
const localVarQueryParameter = {};
|
|
2504
|
+
if (campaignName !== undefined) {
|
|
2505
|
+
localVarQueryParameter['campaignName'] = campaignName;
|
|
2506
|
+
}
|
|
2507
|
+
if (epoch !== undefined) {
|
|
2508
|
+
localVarQueryParameter['epoch'] = epoch;
|
|
2509
|
+
}
|
|
2510
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2511
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2512
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2513
|
+
return {
|
|
2514
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2515
|
+
options: localVarRequestOptions,
|
|
2516
|
+
};
|
|
2517
|
+
}),
|
|
2518
|
+
/**
|
|
2519
|
+
* Returns the interval metadata for provided parameters.
|
|
2520
|
+
* @summary /rewards/metadata/interval
|
|
2521
|
+
* @param {number} [interval] Either specify an interval number or the string \"next\" or \"latest\".
|
|
2522
|
+
* @param {*} [options] Override http request option.
|
|
2523
|
+
* @throws {RequiredError}
|
|
2524
|
+
*/
|
|
2525
|
+
getRewardsIntervalMetadata: (interval_1, ...args_1) => __awaiter(this, [interval_1, ...args_1], void 0, function* (interval, options = {}) {
|
|
2526
|
+
const localVarPath = `/v1/rewards/metadata/interval`;
|
|
2527
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2528
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2529
|
+
let baseOptions;
|
|
2530
|
+
if (configuration) {
|
|
2531
|
+
baseOptions = configuration.baseOptions;
|
|
2532
|
+
}
|
|
2533
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2534
|
+
const localVarHeaderParameter = {};
|
|
2535
|
+
const localVarQueryParameter = {};
|
|
2536
|
+
if (interval !== undefined) {
|
|
2537
|
+
localVarQueryParameter['interval'] = interval;
|
|
2538
|
+
}
|
|
2539
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2540
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2541
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2542
|
+
return {
|
|
2543
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2544
|
+
options: localVarRequestOptions,
|
|
2545
|
+
};
|
|
2546
|
+
}),
|
|
2547
|
+
/**
|
|
2548
|
+
* Returns the all time rewards earned by users.
|
|
2549
|
+
* @summary /rewards/summary
|
|
2550
|
+
* @param {*} [options] Override http request option.
|
|
2551
|
+
* @throws {RequiredError}
|
|
2552
|
+
*/
|
|
2553
|
+
getRewardsSummary: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
2554
|
+
const localVarPath = `/v1/rewards/summary`;
|
|
2555
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2556
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2557
|
+
let baseOptions;
|
|
2558
|
+
if (configuration) {
|
|
2559
|
+
baseOptions = configuration.baseOptions;
|
|
2560
|
+
}
|
|
2561
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2562
|
+
const localVarHeaderParameter = {};
|
|
2563
|
+
const localVarQueryParameter = {};
|
|
2564
|
+
// authentication bearerAuth required
|
|
2565
|
+
// http bearer authentication required
|
|
2566
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
2567
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2568
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2569
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2570
|
+
return {
|
|
2571
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2572
|
+
options: localVarRequestOptions,
|
|
2573
|
+
};
|
|
2574
|
+
}),
|
|
2575
|
+
/**
|
|
2576
|
+
* Submit an application to become an affiliate.
|
|
2577
|
+
* @summary /rewards/affiliate/onboard
|
|
2578
|
+
* @param {OnboardAffiliateRequest} onboardAffiliateRequest
|
|
2579
|
+
* @param {*} [options] Override http request option.
|
|
2580
|
+
* @throws {RequiredError}
|
|
2581
|
+
*/
|
|
2582
|
+
onboardAffiliate: (onboardAffiliateRequest_1, ...args_1) => __awaiter(this, [onboardAffiliateRequest_1, ...args_1], void 0, function* (onboardAffiliateRequest, options = {}) {
|
|
2583
|
+
// verify required parameter 'onboardAffiliateRequest' is not null or undefined
|
|
2584
|
+
(0, common_1.assertParamExists)('onboardAffiliate', 'onboardAffiliateRequest', onboardAffiliateRequest);
|
|
2585
|
+
const localVarPath = `/v1/rewards/affiliate/onboard`;
|
|
2586
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2587
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2588
|
+
let baseOptions;
|
|
2589
|
+
if (configuration) {
|
|
2590
|
+
baseOptions = configuration.baseOptions;
|
|
2591
|
+
}
|
|
2592
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
2593
|
+
const localVarHeaderParameter = {};
|
|
2594
|
+
const localVarQueryParameter = {};
|
|
2595
|
+
// authentication bearerAuth required
|
|
2596
|
+
// http bearer authentication required
|
|
2597
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
2598
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2599
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2600
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2601
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2602
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(onboardAffiliateRequest, localVarRequestOptions, configuration);
|
|
2603
|
+
return {
|
|
2604
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2605
|
+
options: localVarRequestOptions,
|
|
2606
|
+
};
|
|
2607
|
+
}),
|
|
2608
|
+
/**
|
|
2609
|
+
* Onboard a referee with a referral code.
|
|
2610
|
+
* @summary /rewards/affiliate/onboard/referee
|
|
2611
|
+
* @param {OnboardRefereeRequest} onboardRefereeRequest
|
|
2612
|
+
* @param {*} [options] Override http request option.
|
|
2613
|
+
* @throws {RequiredError}
|
|
2614
|
+
*/
|
|
2615
|
+
onboardReferee: (onboardRefereeRequest_1, ...args_1) => __awaiter(this, [onboardRefereeRequest_1, ...args_1], void 0, function* (onboardRefereeRequest, options = {}) {
|
|
2616
|
+
// verify required parameter 'onboardRefereeRequest' is not null or undefined
|
|
2617
|
+
(0, common_1.assertParamExists)('onboardReferee', 'onboardRefereeRequest', onboardRefereeRequest);
|
|
2618
|
+
const localVarPath = `/v1/rewards/affiliate/onboard/referee`;
|
|
2619
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2620
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2621
|
+
let baseOptions;
|
|
2622
|
+
if (configuration) {
|
|
2623
|
+
baseOptions = configuration.baseOptions;
|
|
2624
|
+
}
|
|
2625
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
2626
|
+
const localVarHeaderParameter = {};
|
|
2627
|
+
const localVarQueryParameter = {};
|
|
2628
|
+
// authentication bearerAuth required
|
|
2629
|
+
// http bearer authentication required
|
|
2630
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
2631
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2632
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2633
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2634
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2635
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(onboardRefereeRequest, localVarRequestOptions, configuration);
|
|
2636
|
+
return {
|
|
2637
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2638
|
+
options: localVarRequestOptions,
|
|
2639
|
+
};
|
|
2640
|
+
}),
|
|
2641
|
+
/**
|
|
2642
|
+
* Update the fee config for an affiliate.
|
|
2643
|
+
* @summary /rewards/affiliate/feeConfig
|
|
2644
|
+
* @param {UpdateAffiliateFeeConfigRequest} updateAffiliateFeeConfigRequest
|
|
2645
|
+
* @param {*} [options] Override http request option.
|
|
2646
|
+
* @throws {RequiredError}
|
|
2647
|
+
*/
|
|
2648
|
+
updateAffiliateFeeConfig: (updateAffiliateFeeConfigRequest_1, ...args_1) => __awaiter(this, [updateAffiliateFeeConfigRequest_1, ...args_1], void 0, function* (updateAffiliateFeeConfigRequest, options = {}) {
|
|
2649
|
+
// verify required parameter 'updateAffiliateFeeConfigRequest' is not null or undefined
|
|
2650
|
+
(0, common_1.assertParamExists)('updateAffiliateFeeConfig', 'updateAffiliateFeeConfigRequest', updateAffiliateFeeConfigRequest);
|
|
2651
|
+
const localVarPath = `/v1/rewards/affiliate/feeConfig`;
|
|
2652
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2653
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2654
|
+
let baseOptions;
|
|
2655
|
+
if (configuration) {
|
|
2656
|
+
baseOptions = configuration.baseOptions;
|
|
2657
|
+
}
|
|
2658
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
2659
|
+
const localVarHeaderParameter = {};
|
|
2660
|
+
const localVarQueryParameter = {};
|
|
2661
|
+
// authentication bearerAuth required
|
|
2662
|
+
// http bearer authentication required
|
|
2663
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
2664
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2665
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2666
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2667
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2668
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateAffiliateFeeConfigRequest, localVarRequestOptions, configuration);
|
|
2669
|
+
return {
|
|
2670
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2671
|
+
options: localVarRequestOptions,
|
|
2672
|
+
};
|
|
2673
|
+
}),
|
|
2674
|
+
};
|
|
2675
|
+
};
|
|
2676
|
+
exports.RewardsApiAxiosParamCreator = RewardsApiAxiosParamCreator;
|
|
2677
|
+
/**
|
|
2678
|
+
* RewardsApi - functional programming interface
|
|
2679
|
+
* @export
|
|
2680
|
+
*/
|
|
2681
|
+
const RewardsApiFp = function (configuration) {
|
|
2682
|
+
const localVarAxiosParamCreator = (0, exports.RewardsApiAxiosParamCreator)(configuration);
|
|
2683
|
+
return {
|
|
2684
|
+
/**
|
|
2685
|
+
* Returns detailed earnings breakdown for an affiliate by interval, ordered by interval number in descending order.
|
|
2686
|
+
* @summary /rewards/affiliate/intervalOverview
|
|
2687
|
+
* @param {string} userAddress The address of the user to get interval overview for
|
|
2688
|
+
* @param {number} [page] The page number to retrieve in a paginated response
|
|
2689
|
+
* @param {number} [limit] The page size for pagination
|
|
2690
|
+
* @param {*} [options] Override http request option.
|
|
2691
|
+
* @throws {RequiredError}
|
|
2692
|
+
*/
|
|
2693
|
+
getAffiliateIntervalOverview(userAddress, page, limit, options) {
|
|
2694
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2695
|
+
var _a, _b, _c;
|
|
2696
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAffiliateIntervalOverview(userAddress, page, limit, options);
|
|
2697
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2698
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RewardsApi.getAffiliateIntervalOverview']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2699
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2700
|
+
});
|
|
2701
|
+
},
|
|
2702
|
+
/**
|
|
2703
|
+
* Returns rankings and earnings for affiliates, sorted by the specified category.
|
|
2704
|
+
* @summary /rewards/affiliate/leaderDashboard
|
|
2705
|
+
* @param {GetAffiliateLeaderDashboardSortByEnum} [sortBy] The category to sort rankings by
|
|
2706
|
+
* @param {GetAffiliateLeaderDashboardSortOrderEnum} [sortOrder] The order to sort rankings by
|
|
2707
|
+
* @param {number} [page] The page number to retrieve in a paginated response
|
|
2708
|
+
* @param {number} [limit] The page size for pagination
|
|
2709
|
+
* @param {string} [search] The name/address of the user to filter by
|
|
2710
|
+
* @param {*} [options] Override http request option.
|
|
2711
|
+
* @throws {RequiredError}
|
|
2712
|
+
*/
|
|
2713
|
+
getAffiliateLeaderDashboard(sortBy, sortOrder, page, limit, search, options) {
|
|
2714
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2715
|
+
var _a, _b, _c;
|
|
2716
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAffiliateLeaderDashboard(sortBy, sortOrder, page, limit, search, options);
|
|
2717
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2718
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RewardsApi.getAffiliateLeaderDashboard']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2719
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2720
|
+
});
|
|
2721
|
+
},
|
|
2722
|
+
/**
|
|
2723
|
+
* Returns the affiliate metadata.
|
|
2724
|
+
* @summary /rewards/affiliate
|
|
2725
|
+
* @param {string} userAddress Specify wallet address.
|
|
2726
|
+
* @param {*} [options] Override http request option.
|
|
2727
|
+
* @throws {RequiredError}
|
|
2728
|
+
*/
|
|
2729
|
+
getAffiliateMetadata(userAddress, options) {
|
|
2730
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2731
|
+
var _a, _b, _c;
|
|
2732
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAffiliateMetadata(userAddress, options);
|
|
2733
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2734
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RewardsApi.getAffiliateMetadata']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2735
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2736
|
+
});
|
|
2737
|
+
},
|
|
2738
|
+
/**
|
|
2739
|
+
* Returns detailed earnings breakdown for an affiliate users earnings (including perps, spot LP, lending), referral earnings, and total earnings.
|
|
2740
|
+
* @summary /rewards/affiliate/overview
|
|
2741
|
+
* @param {string} userAddress Specify wallet address.
|
|
2742
|
+
* @param {number} [page] The page number to retrieve in a paginated response
|
|
2743
|
+
* @param {number} [limit] The page size for pagination
|
|
2744
|
+
* @param {GetAffiliateOverviewSortByEnum} [sortBy] The category to sort earnings by
|
|
2745
|
+
* @param {GetAffiliateOverviewSortOrderEnum} [sortOrder] The order to sort earnings by
|
|
2746
|
+
* @param {string} [search] The name/address of the user to filter by
|
|
2747
|
+
* @param {string} [minEarningsE9] The minimum earnings to filter by
|
|
2748
|
+
* @param {*} [options] Override http request option.
|
|
2749
|
+
* @throws {RequiredError}
|
|
2750
|
+
*/
|
|
2751
|
+
getAffiliateOverview(userAddress, page, limit, sortBy, sortOrder, search, minEarningsE9, options) {
|
|
2752
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2753
|
+
var _a, _b, _c;
|
|
2754
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAffiliateOverview(userAddress, page, limit, sortBy, sortOrder, search, minEarningsE9, options);
|
|
2755
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2756
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RewardsApi.getAffiliateOverview']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2757
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2758
|
+
});
|
|
2759
|
+
},
|
|
2760
|
+
/**
|
|
2761
|
+
* Returns performance summary for an affiliate including total referrals, earnings, and rankings.
|
|
2762
|
+
* @summary /rewards/affiliate/summary
|
|
2763
|
+
* @param {string} userAddress Specify wallet address.
|
|
2764
|
+
* @param {*} [options] Override http request option.
|
|
2765
|
+
* @throws {RequiredError}
|
|
2766
|
+
*/
|
|
2767
|
+
getAffiliateSummary(userAddress, options) {
|
|
2768
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2769
|
+
var _a, _b, _c;
|
|
2770
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAffiliateSummary(userAddress, options);
|
|
2771
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2772
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RewardsApi.getAffiliateSummary']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2773
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2774
|
+
});
|
|
2775
|
+
},
|
|
2776
|
+
/**
|
|
2777
|
+
* Returns the rewards earned by users for a specific campaign.
|
|
2778
|
+
* @summary /rewards/campaign
|
|
2779
|
+
* @param {string} campaignName Specify the campaign name
|
|
2780
|
+
* @param {string} userAddress Specify wallet address.
|
|
2781
|
+
* @param {number} [epochNumber] Optionally specify epoch number.
|
|
2782
|
+
* @param {*} [options] Override http request option.
|
|
2783
|
+
* @throws {RequiredError}
|
|
2784
|
+
*/
|
|
2785
|
+
getCampaignRewards(campaignName, userAddress, epochNumber, options) {
|
|
2786
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2787
|
+
var _a, _b, _c;
|
|
2788
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getCampaignRewards(campaignName, userAddress, epochNumber, options);
|
|
2789
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2790
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RewardsApi.getCampaignRewards']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2791
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2792
|
+
});
|
|
2793
|
+
},
|
|
2794
|
+
/**
|
|
2795
|
+
* Returns the rewards earned by users for the intervals.
|
|
2796
|
+
* @summary /rewards
|
|
2797
|
+
* @param {number} [intervalNumber] Optionally specify interval number.
|
|
2798
|
+
* @param {*} [options] Override http request option.
|
|
2799
|
+
* @throws {RequiredError}
|
|
2800
|
+
*/
|
|
2801
|
+
getRewards(intervalNumber, options) {
|
|
2802
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2803
|
+
var _a, _b, _c;
|
|
2804
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getRewards(intervalNumber, options);
|
|
2805
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2806
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RewardsApi.getRewards']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2807
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2808
|
+
});
|
|
2809
|
+
},
|
|
2810
|
+
/**
|
|
2811
|
+
* Returns the metadata for the rewards campaigns.
|
|
2812
|
+
* @summary /rewards/metadata/campaign
|
|
2813
|
+
* @param {string} [campaignName] Specify the campaign name
|
|
2814
|
+
* @param {GetRewardsCampaignMetadataStatusEnum} [status] Optionally specify the status of the campaigns.
|
|
2815
|
+
* @param {*} [options] Override http request option.
|
|
2816
|
+
* @throws {RequiredError}
|
|
2817
|
+
*/
|
|
2818
|
+
getRewardsCampaignMetadata(campaignName, status, options) {
|
|
2819
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2820
|
+
var _a, _b, _c;
|
|
2821
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getRewardsCampaignMetadata(campaignName, status, options);
|
|
2822
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2823
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RewardsApi.getRewardsCampaignMetadata']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2824
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2825
|
+
});
|
|
2826
|
+
},
|
|
2827
|
+
/**
|
|
2828
|
+
* Returns the latest epoch configs for the campaigns.
|
|
2829
|
+
* @summary /rewards/metadata/epoch/configs
|
|
2830
|
+
* @param {number} [intervalNumber] Specify the interval number
|
|
2831
|
+
* @param {*} [options] Override http request option.
|
|
2832
|
+
* @throws {RequiredError}
|
|
2833
|
+
*/
|
|
2834
|
+
getRewardsEpochConfigMetadata(intervalNumber, options) {
|
|
2835
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2836
|
+
var _a, _b, _c;
|
|
2837
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getRewardsEpochConfigMetadata(intervalNumber, options);
|
|
2838
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2839
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RewardsApi.getRewardsEpochConfigMetadata']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2840
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2841
|
+
});
|
|
2842
|
+
},
|
|
2843
|
+
/**
|
|
2844
|
+
* Returns the latest or next epoch epoch for campaign.
|
|
2845
|
+
* @summary /rewards/metadata/epoch
|
|
2846
|
+
* @param {string} [campaignName] Specify the campaign name
|
|
2847
|
+
* @param {GetRewardsEpochMetadataEpochEnum} [epoch] Specify the string \"next\" or \"latest\".
|
|
2848
|
+
* @param {*} [options] Override http request option.
|
|
2849
|
+
* @throws {RequiredError}
|
|
2850
|
+
*/
|
|
2851
|
+
getRewardsEpochMetadata(campaignName, epoch, options) {
|
|
2852
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2853
|
+
var _a, _b, _c;
|
|
2854
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getRewardsEpochMetadata(campaignName, epoch, options);
|
|
2855
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2856
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RewardsApi.getRewardsEpochMetadata']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2857
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2858
|
+
});
|
|
2859
|
+
},
|
|
2860
|
+
/**
|
|
2861
|
+
* Returns the interval metadata for provided parameters.
|
|
2862
|
+
* @summary /rewards/metadata/interval
|
|
2863
|
+
* @param {number} [interval] Either specify an interval number or the string \"next\" or \"latest\".
|
|
2864
|
+
* @param {*} [options] Override http request option.
|
|
2865
|
+
* @throws {RequiredError}
|
|
2866
|
+
*/
|
|
2867
|
+
getRewardsIntervalMetadata(interval, options) {
|
|
2868
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2869
|
+
var _a, _b, _c;
|
|
2870
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getRewardsIntervalMetadata(interval, options);
|
|
2871
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2872
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RewardsApi.getRewardsIntervalMetadata']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2873
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2874
|
+
});
|
|
2875
|
+
},
|
|
2876
|
+
/**
|
|
2877
|
+
* Returns the all time rewards earned by users.
|
|
2878
|
+
* @summary /rewards/summary
|
|
2879
|
+
* @param {*} [options] Override http request option.
|
|
2880
|
+
* @throws {RequiredError}
|
|
2881
|
+
*/
|
|
2882
|
+
getRewardsSummary(options) {
|
|
2883
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2884
|
+
var _a, _b, _c;
|
|
2885
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getRewardsSummary(options);
|
|
2886
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2887
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RewardsApi.getRewardsSummary']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2888
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2889
|
+
});
|
|
2890
|
+
},
|
|
2891
|
+
/**
|
|
2892
|
+
* Submit an application to become an affiliate.
|
|
2893
|
+
* @summary /rewards/affiliate/onboard
|
|
2894
|
+
* @param {OnboardAffiliateRequest} onboardAffiliateRequest
|
|
2895
|
+
* @param {*} [options] Override http request option.
|
|
2896
|
+
* @throws {RequiredError}
|
|
2897
|
+
*/
|
|
2898
|
+
onboardAffiliate(onboardAffiliateRequest, options) {
|
|
2899
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2900
|
+
var _a, _b, _c;
|
|
2901
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.onboardAffiliate(onboardAffiliateRequest, options);
|
|
2902
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2903
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RewardsApi.onboardAffiliate']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2904
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2905
|
+
});
|
|
2906
|
+
},
|
|
2907
|
+
/**
|
|
2908
|
+
* Onboard a referee with a referral code.
|
|
2909
|
+
* @summary /rewards/affiliate/onboard/referee
|
|
2910
|
+
* @param {OnboardRefereeRequest} onboardRefereeRequest
|
|
2911
|
+
* @param {*} [options] Override http request option.
|
|
2912
|
+
* @throws {RequiredError}
|
|
2913
|
+
*/
|
|
2914
|
+
onboardReferee(onboardRefereeRequest, options) {
|
|
2915
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2916
|
+
var _a, _b, _c;
|
|
2917
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.onboardReferee(onboardRefereeRequest, options);
|
|
2918
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2919
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RewardsApi.onboardReferee']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2920
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2921
|
+
});
|
|
2922
|
+
},
|
|
2923
|
+
/**
|
|
2924
|
+
* Update the fee config for an affiliate.
|
|
2925
|
+
* @summary /rewards/affiliate/feeConfig
|
|
2926
|
+
* @param {UpdateAffiliateFeeConfigRequest} updateAffiliateFeeConfigRequest
|
|
2927
|
+
* @param {*} [options] Override http request option.
|
|
2928
|
+
* @throws {RequiredError}
|
|
2929
|
+
*/
|
|
2930
|
+
updateAffiliateFeeConfig(updateAffiliateFeeConfigRequest, options) {
|
|
2931
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2932
|
+
var _a, _b, _c;
|
|
2933
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.updateAffiliateFeeConfig(updateAffiliateFeeConfigRequest, options);
|
|
2934
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2935
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RewardsApi.updateAffiliateFeeConfig']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2936
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2937
|
+
});
|
|
2938
|
+
},
|
|
2939
|
+
};
|
|
2940
|
+
};
|
|
2941
|
+
exports.RewardsApiFp = RewardsApiFp;
|
|
2942
|
+
/**
|
|
2943
|
+
* RewardsApi - factory interface
|
|
2944
|
+
* @export
|
|
2945
|
+
*/
|
|
2946
|
+
const RewardsApiFactory = function (configuration, basePath, axios) {
|
|
2947
|
+
const localVarFp = (0, exports.RewardsApiFp)(configuration);
|
|
2948
|
+
return {
|
|
2949
|
+
/**
|
|
2950
|
+
* Returns detailed earnings breakdown for an affiliate by interval, ordered by interval number in descending order.
|
|
2951
|
+
* @summary /rewards/affiliate/intervalOverview
|
|
2952
|
+
* @param {string} userAddress The address of the user to get interval overview for
|
|
2953
|
+
* @param {number} [page] The page number to retrieve in a paginated response
|
|
2954
|
+
* @param {number} [limit] The page size for pagination
|
|
2955
|
+
* @param {*} [options] Override http request option.
|
|
2956
|
+
* @throws {RequiredError}
|
|
2957
|
+
*/
|
|
2958
|
+
getAffiliateIntervalOverview(userAddress, page, limit, options) {
|
|
2959
|
+
return localVarFp.getAffiliateIntervalOverview(userAddress, page, limit, options).then((request) => request(axios, basePath));
|
|
2960
|
+
},
|
|
2961
|
+
/**
|
|
2962
|
+
* Returns rankings and earnings for affiliates, sorted by the specified category.
|
|
2963
|
+
* @summary /rewards/affiliate/leaderDashboard
|
|
2964
|
+
* @param {GetAffiliateLeaderDashboardSortByEnum} [sortBy] The category to sort rankings by
|
|
2965
|
+
* @param {GetAffiliateLeaderDashboardSortOrderEnum} [sortOrder] The order to sort rankings by
|
|
2966
|
+
* @param {number} [page] The page number to retrieve in a paginated response
|
|
2967
|
+
* @param {number} [limit] The page size for pagination
|
|
2968
|
+
* @param {string} [search] The name/address of the user to filter by
|
|
2969
|
+
* @param {*} [options] Override http request option.
|
|
2970
|
+
* @throws {RequiredError}
|
|
2971
|
+
*/
|
|
2972
|
+
getAffiliateLeaderDashboard(sortBy, sortOrder, page, limit, search, options) {
|
|
2973
|
+
return localVarFp.getAffiliateLeaderDashboard(sortBy, sortOrder, page, limit, search, options).then((request) => request(axios, basePath));
|
|
2974
|
+
},
|
|
2975
|
+
/**
|
|
2976
|
+
* Returns the affiliate metadata.
|
|
2977
|
+
* @summary /rewards/affiliate
|
|
2978
|
+
* @param {string} userAddress Specify wallet address.
|
|
2979
|
+
* @param {*} [options] Override http request option.
|
|
2980
|
+
* @throws {RequiredError}
|
|
2981
|
+
*/
|
|
2982
|
+
getAffiliateMetadata(userAddress, options) {
|
|
2983
|
+
return localVarFp.getAffiliateMetadata(userAddress, options).then((request) => request(axios, basePath));
|
|
2984
|
+
},
|
|
2985
|
+
/**
|
|
2986
|
+
* Returns detailed earnings breakdown for an affiliate users earnings (including perps, spot LP, lending), referral earnings, and total earnings.
|
|
2987
|
+
* @summary /rewards/affiliate/overview
|
|
2988
|
+
* @param {string} userAddress Specify wallet address.
|
|
2989
|
+
* @param {number} [page] The page number to retrieve in a paginated response
|
|
2990
|
+
* @param {number} [limit] The page size for pagination
|
|
2991
|
+
* @param {GetAffiliateOverviewSortByEnum} [sortBy] The category to sort earnings by
|
|
2992
|
+
* @param {GetAffiliateOverviewSortOrderEnum} [sortOrder] The order to sort earnings by
|
|
2993
|
+
* @param {string} [search] The name/address of the user to filter by
|
|
2994
|
+
* @param {string} [minEarningsE9] The minimum earnings to filter by
|
|
2995
|
+
* @param {*} [options] Override http request option.
|
|
2996
|
+
* @throws {RequiredError}
|
|
2997
|
+
*/
|
|
2998
|
+
getAffiliateOverview(userAddress, page, limit, sortBy, sortOrder, search, minEarningsE9, options) {
|
|
2999
|
+
return localVarFp.getAffiliateOverview(userAddress, page, limit, sortBy, sortOrder, search, minEarningsE9, options).then((request) => request(axios, basePath));
|
|
3000
|
+
},
|
|
3001
|
+
/**
|
|
3002
|
+
* Returns performance summary for an affiliate including total referrals, earnings, and rankings.
|
|
3003
|
+
* @summary /rewards/affiliate/summary
|
|
3004
|
+
* @param {string} userAddress Specify wallet address.
|
|
3005
|
+
* @param {*} [options] Override http request option.
|
|
3006
|
+
* @throws {RequiredError}
|
|
3007
|
+
*/
|
|
3008
|
+
getAffiliateSummary(userAddress, options) {
|
|
3009
|
+
return localVarFp.getAffiliateSummary(userAddress, options).then((request) => request(axios, basePath));
|
|
3010
|
+
},
|
|
3011
|
+
/**
|
|
3012
|
+
* Returns the rewards earned by users for a specific campaign.
|
|
3013
|
+
* @summary /rewards/campaign
|
|
3014
|
+
* @param {string} campaignName Specify the campaign name
|
|
3015
|
+
* @param {string} userAddress Specify wallet address.
|
|
3016
|
+
* @param {number} [epochNumber] Optionally specify epoch number.
|
|
3017
|
+
* @param {*} [options] Override http request option.
|
|
3018
|
+
* @throws {RequiredError}
|
|
3019
|
+
*/
|
|
3020
|
+
getCampaignRewards(campaignName, userAddress, epochNumber, options) {
|
|
3021
|
+
return localVarFp.getCampaignRewards(campaignName, userAddress, epochNumber, options).then((request) => request(axios, basePath));
|
|
3022
|
+
},
|
|
3023
|
+
/**
|
|
3024
|
+
* Returns the rewards earned by users for the intervals.
|
|
3025
|
+
* @summary /rewards
|
|
3026
|
+
* @param {number} [intervalNumber] Optionally specify interval number.
|
|
3027
|
+
* @param {*} [options] Override http request option.
|
|
3028
|
+
* @throws {RequiredError}
|
|
3029
|
+
*/
|
|
3030
|
+
getRewards(intervalNumber, options) {
|
|
3031
|
+
return localVarFp.getRewards(intervalNumber, options).then((request) => request(axios, basePath));
|
|
3032
|
+
},
|
|
3033
|
+
/**
|
|
3034
|
+
* Returns the metadata for the rewards campaigns.
|
|
3035
|
+
* @summary /rewards/metadata/campaign
|
|
3036
|
+
* @param {string} [campaignName] Specify the campaign name
|
|
3037
|
+
* @param {GetRewardsCampaignMetadataStatusEnum} [status] Optionally specify the status of the campaigns.
|
|
3038
|
+
* @param {*} [options] Override http request option.
|
|
3039
|
+
* @throws {RequiredError}
|
|
3040
|
+
*/
|
|
3041
|
+
getRewardsCampaignMetadata(campaignName, status, options) {
|
|
3042
|
+
return localVarFp.getRewardsCampaignMetadata(campaignName, status, options).then((request) => request(axios, basePath));
|
|
3043
|
+
},
|
|
3044
|
+
/**
|
|
3045
|
+
* Returns the latest epoch configs for the campaigns.
|
|
3046
|
+
* @summary /rewards/metadata/epoch/configs
|
|
3047
|
+
* @param {number} [intervalNumber] Specify the interval number
|
|
3048
|
+
* @param {*} [options] Override http request option.
|
|
3049
|
+
* @throws {RequiredError}
|
|
3050
|
+
*/
|
|
3051
|
+
getRewardsEpochConfigMetadata(intervalNumber, options) {
|
|
3052
|
+
return localVarFp.getRewardsEpochConfigMetadata(intervalNumber, options).then((request) => request(axios, basePath));
|
|
3053
|
+
},
|
|
3054
|
+
/**
|
|
3055
|
+
* Returns the latest or next epoch epoch for campaign.
|
|
3056
|
+
* @summary /rewards/metadata/epoch
|
|
3057
|
+
* @param {string} [campaignName] Specify the campaign name
|
|
3058
|
+
* @param {GetRewardsEpochMetadataEpochEnum} [epoch] Specify the string \"next\" or \"latest\".
|
|
3059
|
+
* @param {*} [options] Override http request option.
|
|
3060
|
+
* @throws {RequiredError}
|
|
3061
|
+
*/
|
|
3062
|
+
getRewardsEpochMetadata(campaignName, epoch, options) {
|
|
3063
|
+
return localVarFp.getRewardsEpochMetadata(campaignName, epoch, options).then((request) => request(axios, basePath));
|
|
3064
|
+
},
|
|
3065
|
+
/**
|
|
3066
|
+
* Returns the interval metadata for provided parameters.
|
|
3067
|
+
* @summary /rewards/metadata/interval
|
|
3068
|
+
* @param {number} [interval] Either specify an interval number or the string \"next\" or \"latest\".
|
|
3069
|
+
* @param {*} [options] Override http request option.
|
|
3070
|
+
* @throws {RequiredError}
|
|
3071
|
+
*/
|
|
3072
|
+
getRewardsIntervalMetadata(interval, options) {
|
|
3073
|
+
return localVarFp.getRewardsIntervalMetadata(interval, options).then((request) => request(axios, basePath));
|
|
3074
|
+
},
|
|
3075
|
+
/**
|
|
3076
|
+
* Returns the all time rewards earned by users.
|
|
3077
|
+
* @summary /rewards/summary
|
|
3078
|
+
* @param {*} [options] Override http request option.
|
|
3079
|
+
* @throws {RequiredError}
|
|
3080
|
+
*/
|
|
3081
|
+
getRewardsSummary(options) {
|
|
3082
|
+
return localVarFp.getRewardsSummary(options).then((request) => request(axios, basePath));
|
|
3083
|
+
},
|
|
3084
|
+
/**
|
|
3085
|
+
* Submit an application to become an affiliate.
|
|
3086
|
+
* @summary /rewards/affiliate/onboard
|
|
3087
|
+
* @param {OnboardAffiliateRequest} onboardAffiliateRequest
|
|
3088
|
+
* @param {*} [options] Override http request option.
|
|
3089
|
+
* @throws {RequiredError}
|
|
3090
|
+
*/
|
|
3091
|
+
onboardAffiliate(onboardAffiliateRequest, options) {
|
|
3092
|
+
return localVarFp.onboardAffiliate(onboardAffiliateRequest, options).then((request) => request(axios, basePath));
|
|
3093
|
+
},
|
|
3094
|
+
/**
|
|
3095
|
+
* Onboard a referee with a referral code.
|
|
3096
|
+
* @summary /rewards/affiliate/onboard/referee
|
|
3097
|
+
* @param {OnboardRefereeRequest} onboardRefereeRequest
|
|
3098
|
+
* @param {*} [options] Override http request option.
|
|
3099
|
+
* @throws {RequiredError}
|
|
3100
|
+
*/
|
|
3101
|
+
onboardReferee(onboardRefereeRequest, options) {
|
|
3102
|
+
return localVarFp.onboardReferee(onboardRefereeRequest, options).then((request) => request(axios, basePath));
|
|
3103
|
+
},
|
|
3104
|
+
/**
|
|
3105
|
+
* Update the fee config for an affiliate.
|
|
3106
|
+
* @summary /rewards/affiliate/feeConfig
|
|
3107
|
+
* @param {UpdateAffiliateFeeConfigRequest} updateAffiliateFeeConfigRequest
|
|
3108
|
+
* @param {*} [options] Override http request option.
|
|
3109
|
+
* @throws {RequiredError}
|
|
3110
|
+
*/
|
|
3111
|
+
updateAffiliateFeeConfig(updateAffiliateFeeConfigRequest, options) {
|
|
3112
|
+
return localVarFp.updateAffiliateFeeConfig(updateAffiliateFeeConfigRequest, options).then((request) => request(axios, basePath));
|
|
3113
|
+
},
|
|
3114
|
+
};
|
|
3115
|
+
};
|
|
3116
|
+
exports.RewardsApiFactory = RewardsApiFactory;
|
|
3117
|
+
/**
|
|
3118
|
+
* RewardsApi - object-oriented interface
|
|
3119
|
+
* @export
|
|
3120
|
+
* @class RewardsApi
|
|
3121
|
+
* @extends {BaseAPI}
|
|
3122
|
+
*/
|
|
3123
|
+
class RewardsApi extends base_1.BaseAPI {
|
|
3124
|
+
/**
|
|
3125
|
+
* Returns detailed earnings breakdown for an affiliate by interval, ordered by interval number in descending order.
|
|
3126
|
+
* @summary /rewards/affiliate/intervalOverview
|
|
3127
|
+
* @param {string} userAddress The address of the user to get interval overview for
|
|
3128
|
+
* @param {number} [page] The page number to retrieve in a paginated response
|
|
3129
|
+
* @param {number} [limit] The page size for pagination
|
|
3130
|
+
* @param {*} [options] Override http request option.
|
|
3131
|
+
* @throws {RequiredError}
|
|
3132
|
+
* @memberof RewardsApi
|
|
3133
|
+
*/
|
|
3134
|
+
getAffiliateIntervalOverview(userAddress, page, limit, options) {
|
|
3135
|
+
return (0, exports.RewardsApiFp)(this.configuration).getAffiliateIntervalOverview(userAddress, page, limit, options).then((request) => request(this.axios, this.basePath));
|
|
3136
|
+
}
|
|
3137
|
+
/**
|
|
3138
|
+
* Returns rankings and earnings for affiliates, sorted by the specified category.
|
|
3139
|
+
* @summary /rewards/affiliate/leaderDashboard
|
|
3140
|
+
* @param {GetAffiliateLeaderDashboardSortByEnum} [sortBy] The category to sort rankings by
|
|
3141
|
+
* @param {GetAffiliateLeaderDashboardSortOrderEnum} [sortOrder] The order to sort rankings by
|
|
3142
|
+
* @param {number} [page] The page number to retrieve in a paginated response
|
|
3143
|
+
* @param {number} [limit] The page size for pagination
|
|
3144
|
+
* @param {string} [search] The name/address of the user to filter by
|
|
3145
|
+
* @param {*} [options] Override http request option.
|
|
3146
|
+
* @throws {RequiredError}
|
|
3147
|
+
* @memberof RewardsApi
|
|
3148
|
+
*/
|
|
3149
|
+
getAffiliateLeaderDashboard(sortBy, sortOrder, page, limit, search, options) {
|
|
3150
|
+
return (0, exports.RewardsApiFp)(this.configuration).getAffiliateLeaderDashboard(sortBy, sortOrder, page, limit, search, options).then((request) => request(this.axios, this.basePath));
|
|
3151
|
+
}
|
|
3152
|
+
/**
|
|
3153
|
+
* Returns the affiliate metadata.
|
|
3154
|
+
* @summary /rewards/affiliate
|
|
3155
|
+
* @param {string} userAddress Specify wallet address.
|
|
3156
|
+
* @param {*} [options] Override http request option.
|
|
3157
|
+
* @throws {RequiredError}
|
|
3158
|
+
* @memberof RewardsApi
|
|
3159
|
+
*/
|
|
3160
|
+
getAffiliateMetadata(userAddress, options) {
|
|
3161
|
+
return (0, exports.RewardsApiFp)(this.configuration).getAffiliateMetadata(userAddress, options).then((request) => request(this.axios, this.basePath));
|
|
3162
|
+
}
|
|
3163
|
+
/**
|
|
3164
|
+
* Returns detailed earnings breakdown for an affiliate users earnings (including perps, spot LP, lending), referral earnings, and total earnings.
|
|
3165
|
+
* @summary /rewards/affiliate/overview
|
|
3166
|
+
* @param {string} userAddress Specify wallet address.
|
|
3167
|
+
* @param {number} [page] The page number to retrieve in a paginated response
|
|
3168
|
+
* @param {number} [limit] The page size for pagination
|
|
3169
|
+
* @param {GetAffiliateOverviewSortByEnum} [sortBy] The category to sort earnings by
|
|
3170
|
+
* @param {GetAffiliateOverviewSortOrderEnum} [sortOrder] The order to sort earnings by
|
|
3171
|
+
* @param {string} [search] The name/address of the user to filter by
|
|
3172
|
+
* @param {string} [minEarningsE9] The minimum earnings to filter by
|
|
3173
|
+
* @param {*} [options] Override http request option.
|
|
3174
|
+
* @throws {RequiredError}
|
|
3175
|
+
* @memberof RewardsApi
|
|
3176
|
+
*/
|
|
3177
|
+
getAffiliateOverview(userAddress, page, limit, sortBy, sortOrder, search, minEarningsE9, options) {
|
|
3178
|
+
return (0, exports.RewardsApiFp)(this.configuration).getAffiliateOverview(userAddress, page, limit, sortBy, sortOrder, search, minEarningsE9, options).then((request) => request(this.axios, this.basePath));
|
|
3179
|
+
}
|
|
3180
|
+
/**
|
|
3181
|
+
* Returns performance summary for an affiliate including total referrals, earnings, and rankings.
|
|
3182
|
+
* @summary /rewards/affiliate/summary
|
|
3183
|
+
* @param {string} userAddress Specify wallet address.
|
|
3184
|
+
* @param {*} [options] Override http request option.
|
|
3185
|
+
* @throws {RequiredError}
|
|
3186
|
+
* @memberof RewardsApi
|
|
3187
|
+
*/
|
|
3188
|
+
getAffiliateSummary(userAddress, options) {
|
|
3189
|
+
return (0, exports.RewardsApiFp)(this.configuration).getAffiliateSummary(userAddress, options).then((request) => request(this.axios, this.basePath));
|
|
3190
|
+
}
|
|
3191
|
+
/**
|
|
3192
|
+
* Returns the rewards earned by users for a specific campaign.
|
|
3193
|
+
* @summary /rewards/campaign
|
|
3194
|
+
* @param {string} campaignName Specify the campaign name
|
|
3195
|
+
* @param {string} userAddress Specify wallet address.
|
|
3196
|
+
* @param {number} [epochNumber] Optionally specify epoch number.
|
|
3197
|
+
* @param {*} [options] Override http request option.
|
|
3198
|
+
* @throws {RequiredError}
|
|
3199
|
+
* @memberof RewardsApi
|
|
3200
|
+
*/
|
|
3201
|
+
getCampaignRewards(campaignName, userAddress, epochNumber, options) {
|
|
3202
|
+
return (0, exports.RewardsApiFp)(this.configuration).getCampaignRewards(campaignName, userAddress, epochNumber, options).then((request) => request(this.axios, this.basePath));
|
|
3203
|
+
}
|
|
3204
|
+
/**
|
|
3205
|
+
* Returns the rewards earned by users for the intervals.
|
|
3206
|
+
* @summary /rewards
|
|
3207
|
+
* @param {number} [intervalNumber] Optionally specify interval number.
|
|
3208
|
+
* @param {*} [options] Override http request option.
|
|
3209
|
+
* @throws {RequiredError}
|
|
3210
|
+
* @memberof RewardsApi
|
|
3211
|
+
*/
|
|
3212
|
+
getRewards(intervalNumber, options) {
|
|
3213
|
+
return (0, exports.RewardsApiFp)(this.configuration).getRewards(intervalNumber, options).then((request) => request(this.axios, this.basePath));
|
|
3214
|
+
}
|
|
3215
|
+
/**
|
|
3216
|
+
* Returns the metadata for the rewards campaigns.
|
|
3217
|
+
* @summary /rewards/metadata/campaign
|
|
3218
|
+
* @param {string} [campaignName] Specify the campaign name
|
|
3219
|
+
* @param {GetRewardsCampaignMetadataStatusEnum} [status] Optionally specify the status of the campaigns.
|
|
3220
|
+
* @param {*} [options] Override http request option.
|
|
3221
|
+
* @throws {RequiredError}
|
|
3222
|
+
* @memberof RewardsApi
|
|
3223
|
+
*/
|
|
3224
|
+
getRewardsCampaignMetadata(campaignName, status, options) {
|
|
3225
|
+
return (0, exports.RewardsApiFp)(this.configuration).getRewardsCampaignMetadata(campaignName, status, options).then((request) => request(this.axios, this.basePath));
|
|
3226
|
+
}
|
|
3227
|
+
/**
|
|
3228
|
+
* Returns the latest epoch configs for the campaigns.
|
|
3229
|
+
* @summary /rewards/metadata/epoch/configs
|
|
3230
|
+
* @param {number} [intervalNumber] Specify the interval number
|
|
3231
|
+
* @param {*} [options] Override http request option.
|
|
3232
|
+
* @throws {RequiredError}
|
|
3233
|
+
* @memberof RewardsApi
|
|
3234
|
+
*/
|
|
3235
|
+
getRewardsEpochConfigMetadata(intervalNumber, options) {
|
|
3236
|
+
return (0, exports.RewardsApiFp)(this.configuration).getRewardsEpochConfigMetadata(intervalNumber, options).then((request) => request(this.axios, this.basePath));
|
|
3237
|
+
}
|
|
3238
|
+
/**
|
|
3239
|
+
* Returns the latest or next epoch epoch for campaign.
|
|
3240
|
+
* @summary /rewards/metadata/epoch
|
|
3241
|
+
* @param {string} [campaignName] Specify the campaign name
|
|
3242
|
+
* @param {GetRewardsEpochMetadataEpochEnum} [epoch] Specify the string \"next\" or \"latest\".
|
|
3243
|
+
* @param {*} [options] Override http request option.
|
|
3244
|
+
* @throws {RequiredError}
|
|
3245
|
+
* @memberof RewardsApi
|
|
3246
|
+
*/
|
|
3247
|
+
getRewardsEpochMetadata(campaignName, epoch, options) {
|
|
3248
|
+
return (0, exports.RewardsApiFp)(this.configuration).getRewardsEpochMetadata(campaignName, epoch, options).then((request) => request(this.axios, this.basePath));
|
|
3249
|
+
}
|
|
3250
|
+
/**
|
|
3251
|
+
* Returns the interval metadata for provided parameters.
|
|
3252
|
+
* @summary /rewards/metadata/interval
|
|
3253
|
+
* @param {number} [interval] Either specify an interval number or the string \"next\" or \"latest\".
|
|
3254
|
+
* @param {*} [options] Override http request option.
|
|
3255
|
+
* @throws {RequiredError}
|
|
3256
|
+
* @memberof RewardsApi
|
|
3257
|
+
*/
|
|
3258
|
+
getRewardsIntervalMetadata(interval, options) {
|
|
3259
|
+
return (0, exports.RewardsApiFp)(this.configuration).getRewardsIntervalMetadata(interval, options).then((request) => request(this.axios, this.basePath));
|
|
3260
|
+
}
|
|
3261
|
+
/**
|
|
3262
|
+
* Returns the all time rewards earned by users.
|
|
3263
|
+
* @summary /rewards/summary
|
|
3264
|
+
* @param {*} [options] Override http request option.
|
|
3265
|
+
* @throws {RequiredError}
|
|
3266
|
+
* @memberof RewardsApi
|
|
3267
|
+
*/
|
|
3268
|
+
getRewardsSummary(options) {
|
|
3269
|
+
return (0, exports.RewardsApiFp)(this.configuration).getRewardsSummary(options).then((request) => request(this.axios, this.basePath));
|
|
3270
|
+
}
|
|
3271
|
+
/**
|
|
3272
|
+
* Submit an application to become an affiliate.
|
|
3273
|
+
* @summary /rewards/affiliate/onboard
|
|
3274
|
+
* @param {OnboardAffiliateRequest} onboardAffiliateRequest
|
|
3275
|
+
* @param {*} [options] Override http request option.
|
|
3276
|
+
* @throws {RequiredError}
|
|
3277
|
+
* @memberof RewardsApi
|
|
3278
|
+
*/
|
|
3279
|
+
onboardAffiliate(onboardAffiliateRequest, options) {
|
|
3280
|
+
return (0, exports.RewardsApiFp)(this.configuration).onboardAffiliate(onboardAffiliateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
3281
|
+
}
|
|
3282
|
+
/**
|
|
3283
|
+
* Onboard a referee with a referral code.
|
|
3284
|
+
* @summary /rewards/affiliate/onboard/referee
|
|
3285
|
+
* @param {OnboardRefereeRequest} onboardRefereeRequest
|
|
3286
|
+
* @param {*} [options] Override http request option.
|
|
3287
|
+
* @throws {RequiredError}
|
|
3288
|
+
* @memberof RewardsApi
|
|
3289
|
+
*/
|
|
3290
|
+
onboardReferee(onboardRefereeRequest, options) {
|
|
3291
|
+
return (0, exports.RewardsApiFp)(this.configuration).onboardReferee(onboardRefereeRequest, options).then((request) => request(this.axios, this.basePath));
|
|
3292
|
+
}
|
|
3293
|
+
/**
|
|
3294
|
+
* Update the fee config for an affiliate.
|
|
3295
|
+
* @summary /rewards/affiliate/feeConfig
|
|
3296
|
+
* @param {UpdateAffiliateFeeConfigRequest} updateAffiliateFeeConfigRequest
|
|
3297
|
+
* @param {*} [options] Override http request option.
|
|
3298
|
+
* @throws {RequiredError}
|
|
3299
|
+
* @memberof RewardsApi
|
|
3300
|
+
*/
|
|
3301
|
+
updateAffiliateFeeConfig(updateAffiliateFeeConfigRequest, options) {
|
|
3302
|
+
return (0, exports.RewardsApiFp)(this.configuration).updateAffiliateFeeConfig(updateAffiliateFeeConfigRequest, options).then((request) => request(this.axios, this.basePath));
|
|
3303
|
+
}
|
|
3304
|
+
}
|
|
3305
|
+
exports.RewardsApi = RewardsApi;
|
|
3306
|
+
/**
|
|
3307
|
+
* @export
|
|
3308
|
+
*/
|
|
3309
|
+
exports.GetAffiliateLeaderDashboardSortByEnum = {
|
|
3310
|
+
PerpsRank: 'perpsRank',
|
|
3311
|
+
LendingRank: 'lendingRank',
|
|
3312
|
+
SpotRank: 'spotRank'
|
|
3313
|
+
};
|
|
3314
|
+
/**
|
|
3315
|
+
* @export
|
|
3316
|
+
*/
|
|
3317
|
+
exports.GetAffiliateLeaderDashboardSortOrderEnum = {
|
|
3318
|
+
Asc: 'asc',
|
|
3319
|
+
Desc: 'desc'
|
|
3320
|
+
};
|
|
3321
|
+
/**
|
|
3322
|
+
* @export
|
|
3323
|
+
*/
|
|
3324
|
+
exports.GetAffiliateOverviewSortByEnum = {
|
|
3325
|
+
RefreeEarnings: 'refreeEarnings',
|
|
3326
|
+
ReferralEarnings: 'referralEarnings',
|
|
3327
|
+
TotalEarnings: 'totalEarnings'
|
|
3328
|
+
};
|
|
3329
|
+
/**
|
|
3330
|
+
* @export
|
|
3331
|
+
*/
|
|
3332
|
+
exports.GetAffiliateOverviewSortOrderEnum = {
|
|
3333
|
+
Asc: 'asc',
|
|
3334
|
+
Desc: 'desc'
|
|
3335
|
+
};
|
|
3336
|
+
/**
|
|
3337
|
+
* @export
|
|
3338
|
+
*/
|
|
3339
|
+
exports.GetRewardsCampaignMetadataStatusEnum = {
|
|
3340
|
+
Active: 'ACTIVE',
|
|
3341
|
+
Inactive: 'INACTIVE'
|
|
3342
|
+
};
|
|
3343
|
+
/**
|
|
3344
|
+
* @export
|
|
3345
|
+
*/
|
|
3346
|
+
exports.GetRewardsEpochMetadataEpochEnum = {
|
|
3347
|
+
Next: 'next',
|
|
3348
|
+
Latest: 'latest'
|
|
3349
|
+
};
|
|
3350
|
+
/**
|
|
3351
|
+
* StreamsApi - axios parameter creator
|
|
3352
|
+
* @export
|
|
3353
|
+
*/
|
|
3354
|
+
const StreamsApiAxiosParamCreator = function (configuration) {
|
|
3355
|
+
return {
|
|
3356
|
+
/**
|
|
3357
|
+
* WebSocket Account Streams URL.
|
|
3358
|
+
* @param {string} authorization
|
|
3359
|
+
* @param {WebSocketAccountDataUpgradeEnum} upgrade
|
|
3360
|
+
* @param {string} secWebSocketKey WebSocket key used during the handshake.
|
|
3361
|
+
* @param {WebSocketAccountDataSecWebSocketVersionEnum} secWebSocketVersion WebSocket protocol version.
|
|
3362
|
+
* @param {*} [options] Override http request option.
|
|
3363
|
+
* @throws {RequiredError}
|
|
3364
|
+
*/
|
|
3365
|
+
webSocketAccountData: (authorization_1, upgrade_1, secWebSocketKey_1, secWebSocketVersion_1, ...args_1) => __awaiter(this, [authorization_1, upgrade_1, secWebSocketKey_1, secWebSocketVersion_1, ...args_1], void 0, function* (authorization, upgrade, secWebSocketKey, secWebSocketVersion, options = {}) {
|
|
3366
|
+
// verify required parameter 'authorization' is not null or undefined
|
|
3367
|
+
(0, common_1.assertParamExists)('webSocketAccountData', 'authorization', authorization);
|
|
3368
|
+
// verify required parameter 'upgrade' is not null or undefined
|
|
3369
|
+
(0, common_1.assertParamExists)('webSocketAccountData', 'upgrade', upgrade);
|
|
3370
|
+
// verify required parameter 'secWebSocketKey' is not null or undefined
|
|
3371
|
+
(0, common_1.assertParamExists)('webSocketAccountData', 'secWebSocketKey', secWebSocketKey);
|
|
3372
|
+
// verify required parameter 'secWebSocketVersion' is not null or undefined
|
|
3373
|
+
(0, common_1.assertParamExists)('webSocketAccountData', 'secWebSocketVersion', secWebSocketVersion);
|
|
3374
|
+
const localVarPath = `/ws/account`;
|
|
3375
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3376
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
3377
|
+
let baseOptions;
|
|
3378
|
+
if (configuration) {
|
|
3379
|
+
baseOptions = configuration.baseOptions;
|
|
3380
|
+
}
|
|
3381
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
3382
|
+
const localVarHeaderParameter = {};
|
|
3383
|
+
const localVarQueryParameter = {};
|
|
3384
|
+
// authentication bearerAuth required
|
|
3385
|
+
// http bearer authentication required
|
|
3386
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
3387
|
+
if (authorization != null) {
|
|
3388
|
+
localVarHeaderParameter['Authorization'] = String(authorization);
|
|
3389
|
+
}
|
|
3390
|
+
if (upgrade != null) {
|
|
3391
|
+
localVarHeaderParameter['Upgrade'] = String(upgrade);
|
|
3392
|
+
}
|
|
3393
|
+
if (secWebSocketKey != null) {
|
|
3394
|
+
localVarHeaderParameter['Sec-WebSocket-Key'] = String(secWebSocketKey);
|
|
3395
|
+
}
|
|
3396
|
+
if (secWebSocketVersion != null) {
|
|
3397
|
+
localVarHeaderParameter['Sec-WebSocket-Version'] = String(secWebSocketVersion);
|
|
3398
|
+
}
|
|
3399
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
3400
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3401
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3402
|
+
return {
|
|
3403
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
3404
|
+
options: localVarRequestOptions,
|
|
3405
|
+
};
|
|
3406
|
+
}),
|
|
3407
|
+
/**
|
|
3408
|
+
* WebSocket Market Streams URL.
|
|
3409
|
+
* @param {WebSocketMarketDataUpgradeEnum} upgrade
|
|
3410
|
+
* @param {string} secWebSocketKey WebSocket key used during the handshake.
|
|
3411
|
+
* @param {WebSocketMarketDataSecWebSocketVersionEnum} secWebSocketVersion WebSocket protocol version.
|
|
3412
|
+
* @param {*} [options] Override http request option.
|
|
3413
|
+
* @throws {RequiredError}
|
|
3414
|
+
*/
|
|
3415
|
+
webSocketMarketData: (upgrade_1, secWebSocketKey_1, secWebSocketVersion_1, ...args_1) => __awaiter(this, [upgrade_1, secWebSocketKey_1, secWebSocketVersion_1, ...args_1], void 0, function* (upgrade, secWebSocketKey, secWebSocketVersion, options = {}) {
|
|
3416
|
+
// verify required parameter 'upgrade' is not null or undefined
|
|
3417
|
+
(0, common_1.assertParamExists)('webSocketMarketData', 'upgrade', upgrade);
|
|
3418
|
+
// verify required parameter 'secWebSocketKey' is not null or undefined
|
|
3419
|
+
(0, common_1.assertParamExists)('webSocketMarketData', 'secWebSocketKey', secWebSocketKey);
|
|
3420
|
+
// verify required parameter 'secWebSocketVersion' is not null or undefined
|
|
3421
|
+
(0, common_1.assertParamExists)('webSocketMarketData', 'secWebSocketVersion', secWebSocketVersion);
|
|
3422
|
+
const localVarPath = `/ws/market`;
|
|
3423
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3424
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
3425
|
+
let baseOptions;
|
|
3426
|
+
if (configuration) {
|
|
3427
|
+
baseOptions = configuration.baseOptions;
|
|
3428
|
+
}
|
|
3429
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
3430
|
+
const localVarHeaderParameter = {};
|
|
3431
|
+
const localVarQueryParameter = {};
|
|
3432
|
+
if (upgrade != null) {
|
|
3433
|
+
localVarHeaderParameter['Upgrade'] = String(upgrade);
|
|
3434
|
+
}
|
|
3435
|
+
if (secWebSocketKey != null) {
|
|
3436
|
+
localVarHeaderParameter['Sec-WebSocket-Key'] = String(secWebSocketKey);
|
|
3437
|
+
}
|
|
3438
|
+
if (secWebSocketVersion != null) {
|
|
3439
|
+
localVarHeaderParameter['Sec-WebSocket-Version'] = String(secWebSocketVersion);
|
|
3440
|
+
}
|
|
3441
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
3442
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3443
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3444
|
+
return {
|
|
3445
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
3446
|
+
options: localVarRequestOptions,
|
|
3447
|
+
};
|
|
3448
|
+
}),
|
|
3449
|
+
};
|
|
3450
|
+
};
|
|
3451
|
+
exports.StreamsApiAxiosParamCreator = StreamsApiAxiosParamCreator;
|
|
3452
|
+
/**
|
|
3453
|
+
* StreamsApi - functional programming interface
|
|
3454
|
+
* @export
|
|
3455
|
+
*/
|
|
3456
|
+
const StreamsApiFp = function (configuration) {
|
|
3457
|
+
const localVarAxiosParamCreator = (0, exports.StreamsApiAxiosParamCreator)(configuration);
|
|
3458
|
+
return {
|
|
3459
|
+
/**
|
|
3460
|
+
* WebSocket Account Streams URL.
|
|
3461
|
+
* @param {string} authorization
|
|
3462
|
+
* @param {WebSocketAccountDataUpgradeEnum} upgrade
|
|
3463
|
+
* @param {string} secWebSocketKey WebSocket key used during the handshake.
|
|
3464
|
+
* @param {WebSocketAccountDataSecWebSocketVersionEnum} secWebSocketVersion WebSocket protocol version.
|
|
3465
|
+
* @param {*} [options] Override http request option.
|
|
3466
|
+
* @throws {RequiredError}
|
|
3467
|
+
*/
|
|
3468
|
+
webSocketAccountData(authorization, upgrade, secWebSocketKey, secWebSocketVersion, options) {
|
|
3469
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3470
|
+
var _a, _b, _c;
|
|
3471
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.webSocketAccountData(authorization, upgrade, secWebSocketKey, secWebSocketVersion, options);
|
|
3472
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
3473
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['StreamsApi.webSocketAccountData']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
3474
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3475
|
+
});
|
|
3476
|
+
},
|
|
3477
|
+
/**
|
|
3478
|
+
* WebSocket Market Streams URL.
|
|
3479
|
+
* @param {WebSocketMarketDataUpgradeEnum} upgrade
|
|
3480
|
+
* @param {string} secWebSocketKey WebSocket key used during the handshake.
|
|
3481
|
+
* @param {WebSocketMarketDataSecWebSocketVersionEnum} secWebSocketVersion WebSocket protocol version.
|
|
3482
|
+
* @param {*} [options] Override http request option.
|
|
3483
|
+
* @throws {RequiredError}
|
|
3484
|
+
*/
|
|
3485
|
+
webSocketMarketData(upgrade, secWebSocketKey, secWebSocketVersion, options) {
|
|
3486
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3487
|
+
var _a, _b, _c;
|
|
3488
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.webSocketMarketData(upgrade, secWebSocketKey, secWebSocketVersion, options);
|
|
3489
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
3490
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['StreamsApi.webSocketMarketData']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
3491
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3492
|
+
});
|
|
3493
|
+
},
|
|
3494
|
+
};
|
|
3495
|
+
};
|
|
3496
|
+
exports.StreamsApiFp = StreamsApiFp;
|
|
3497
|
+
/**
|
|
3498
|
+
* StreamsApi - factory interface
|
|
3499
|
+
* @export
|
|
3500
|
+
*/
|
|
3501
|
+
const StreamsApiFactory = function (configuration, basePath, axios) {
|
|
3502
|
+
const localVarFp = (0, exports.StreamsApiFp)(configuration);
|
|
3503
|
+
return {
|
|
3504
|
+
/**
|
|
3505
|
+
* WebSocket Account Streams URL.
|
|
3506
|
+
* @param {string} authorization
|
|
3507
|
+
* @param {WebSocketAccountDataUpgradeEnum} upgrade
|
|
3508
|
+
* @param {string} secWebSocketKey WebSocket key used during the handshake.
|
|
3509
|
+
* @param {WebSocketAccountDataSecWebSocketVersionEnum} secWebSocketVersion WebSocket protocol version.
|
|
3510
|
+
* @param {*} [options] Override http request option.
|
|
3511
|
+
* @throws {RequiredError}
|
|
3512
|
+
*/
|
|
3513
|
+
webSocketAccountData(authorization, upgrade, secWebSocketKey, secWebSocketVersion, options) {
|
|
3514
|
+
return localVarFp.webSocketAccountData(authorization, upgrade, secWebSocketKey, secWebSocketVersion, options).then((request) => request(axios, basePath));
|
|
3515
|
+
},
|
|
3516
|
+
/**
|
|
3517
|
+
* WebSocket Market Streams URL.
|
|
3518
|
+
* @param {WebSocketMarketDataUpgradeEnum} upgrade
|
|
3519
|
+
* @param {string} secWebSocketKey WebSocket key used during the handshake.
|
|
3520
|
+
* @param {WebSocketMarketDataSecWebSocketVersionEnum} secWebSocketVersion WebSocket protocol version.
|
|
3521
|
+
* @param {*} [options] Override http request option.
|
|
3522
|
+
* @throws {RequiredError}
|
|
3523
|
+
*/
|
|
3524
|
+
webSocketMarketData(upgrade, secWebSocketKey, secWebSocketVersion, options) {
|
|
3525
|
+
return localVarFp.webSocketMarketData(upgrade, secWebSocketKey, secWebSocketVersion, options).then((request) => request(axios, basePath));
|
|
3526
|
+
},
|
|
3527
|
+
};
|
|
3528
|
+
};
|
|
3529
|
+
exports.StreamsApiFactory = StreamsApiFactory;
|
|
3530
|
+
/**
|
|
3531
|
+
* StreamsApi - object-oriented interface
|
|
3532
|
+
* @export
|
|
3533
|
+
* @class StreamsApi
|
|
3534
|
+
* @extends {BaseAPI}
|
|
3535
|
+
*/
|
|
3536
|
+
class StreamsApi extends base_1.BaseAPI {
|
|
3537
|
+
/**
|
|
3538
|
+
* WebSocket Account Streams URL.
|
|
3539
|
+
* @param {string} authorization
|
|
3540
|
+
* @param {WebSocketAccountDataUpgradeEnum} upgrade
|
|
3541
|
+
* @param {string} secWebSocketKey WebSocket key used during the handshake.
|
|
3542
|
+
* @param {WebSocketAccountDataSecWebSocketVersionEnum} secWebSocketVersion WebSocket protocol version.
|
|
3543
|
+
* @param {*} [options] Override http request option.
|
|
3544
|
+
* @throws {RequiredError}
|
|
3545
|
+
* @memberof StreamsApi
|
|
3546
|
+
*/
|
|
3547
|
+
webSocketAccountData(authorization, upgrade, secWebSocketKey, secWebSocketVersion, options) {
|
|
3548
|
+
return (0, exports.StreamsApiFp)(this.configuration).webSocketAccountData(authorization, upgrade, secWebSocketKey, secWebSocketVersion, options).then((request) => request(this.axios, this.basePath));
|
|
3549
|
+
}
|
|
3550
|
+
/**
|
|
3551
|
+
* WebSocket Market Streams URL.
|
|
3552
|
+
* @param {WebSocketMarketDataUpgradeEnum} upgrade
|
|
3553
|
+
* @param {string} secWebSocketKey WebSocket key used during the handshake.
|
|
3554
|
+
* @param {WebSocketMarketDataSecWebSocketVersionEnum} secWebSocketVersion WebSocket protocol version.
|
|
3555
|
+
* @param {*} [options] Override http request option.
|
|
3556
|
+
* @throws {RequiredError}
|
|
3557
|
+
* @memberof StreamsApi
|
|
3558
|
+
*/
|
|
3559
|
+
webSocketMarketData(upgrade, secWebSocketKey, secWebSocketVersion, options) {
|
|
3560
|
+
return (0, exports.StreamsApiFp)(this.configuration).webSocketMarketData(upgrade, secWebSocketKey, secWebSocketVersion, options).then((request) => request(this.axios, this.basePath));
|
|
3561
|
+
}
|
|
3562
|
+
}
|
|
3563
|
+
exports.StreamsApi = StreamsApi;
|
|
3564
|
+
/**
|
|
3565
|
+
* @export
|
|
3566
|
+
*/
|
|
3567
|
+
exports.WebSocketAccountDataUpgradeEnum = {
|
|
3568
|
+
Websocket: 'websocket'
|
|
3569
|
+
};
|
|
3570
|
+
/**
|
|
3571
|
+
* @export
|
|
3572
|
+
*/
|
|
3573
|
+
exports.WebSocketAccountDataSecWebSocketVersionEnum = {
|
|
3574
|
+
_13: '13'
|
|
3575
|
+
};
|
|
3576
|
+
/**
|
|
3577
|
+
* @export
|
|
3578
|
+
*/
|
|
3579
|
+
exports.WebSocketMarketDataUpgradeEnum = {
|
|
3580
|
+
Websocket: 'websocket'
|
|
3581
|
+
};
|
|
3582
|
+
/**
|
|
3583
|
+
* @export
|
|
3584
|
+
*/
|
|
3585
|
+
exports.WebSocketMarketDataSecWebSocketVersionEnum = {
|
|
3586
|
+
_13: '13'
|
|
3587
|
+
};
|
|
3588
|
+
/**
|
|
3589
|
+
* TradeApi - axios parameter creator
|
|
3590
|
+
* @export
|
|
3591
|
+
*/
|
|
3592
|
+
const TradeApiAxiosParamCreator = function (configuration) {
|
|
3593
|
+
return {
|
|
3594
|
+
/**
|
|
3595
|
+
* Cancel orders for a market using order hashes. - May be a single order hash or a list of order hashes. - All orders must belong to the same account. - If no order hashes are specified, then will cancel all orders for the given market - All orders being cancelled by request will receive the same time priority.
|
|
3596
|
+
* @summary /trade/orders/cancel
|
|
3597
|
+
* @param {CancelOrdersRequest} cancelOrdersRequest
|
|
3598
|
+
* @param {*} [options] Override http request option.
|
|
3599
|
+
* @throws {RequiredError}
|
|
3600
|
+
*/
|
|
3601
|
+
cancelOrders: (cancelOrdersRequest_1, ...args_1) => __awaiter(this, [cancelOrdersRequest_1, ...args_1], void 0, function* (cancelOrdersRequest, options = {}) {
|
|
3602
|
+
// verify required parameter 'cancelOrdersRequest' is not null or undefined
|
|
3603
|
+
(0, common_1.assertParamExists)('cancelOrders', 'cancelOrdersRequest', cancelOrdersRequest);
|
|
3604
|
+
const localVarPath = `/api/v1/trade/orders/cancel`;
|
|
3605
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3606
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
3607
|
+
let baseOptions;
|
|
3608
|
+
if (configuration) {
|
|
3609
|
+
baseOptions = configuration.baseOptions;
|
|
3610
|
+
}
|
|
3611
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
|
|
3612
|
+
const localVarHeaderParameter = {};
|
|
3613
|
+
const localVarQueryParameter = {};
|
|
3614
|
+
// authentication bearerAuth required
|
|
3615
|
+
// http bearer authentication required
|
|
3616
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
3617
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
3618
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
3619
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3620
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3621
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(cancelOrdersRequest, localVarRequestOptions, configuration);
|
|
3622
|
+
return {
|
|
3623
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
3624
|
+
options: localVarRequestOptions,
|
|
3625
|
+
};
|
|
3626
|
+
}),
|
|
3627
|
+
/**
|
|
3628
|
+
* Cancel orders in standby for a market using order hashes. - May be a single order hash or a list of order hashes. - All orders must belong to the same account. - If no order hashes are specified, then will cancel all orders for the given market - All orders being cancelled by request will receive the same time priority.
|
|
3629
|
+
* @summary /trade/orders/cancel/standby
|
|
3630
|
+
* @param {CancelOrdersRequest} cancelOrdersRequest
|
|
3631
|
+
* @param {*} [options] Override http request option.
|
|
3632
|
+
* @throws {RequiredError}
|
|
3633
|
+
*/
|
|
3634
|
+
cancelStandbyOrders: (cancelOrdersRequest_1, ...args_1) => __awaiter(this, [cancelOrdersRequest_1, ...args_1], void 0, function* (cancelOrdersRequest, options = {}) {
|
|
3635
|
+
// verify required parameter 'cancelOrdersRequest' is not null or undefined
|
|
3636
|
+
(0, common_1.assertParamExists)('cancelStandbyOrders', 'cancelOrdersRequest', cancelOrdersRequest);
|
|
3637
|
+
const localVarPath = `/api/v1/trade/orders/cancel/standby`;
|
|
3638
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3639
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
3640
|
+
let baseOptions;
|
|
3641
|
+
if (configuration) {
|
|
3642
|
+
baseOptions = configuration.baseOptions;
|
|
3643
|
+
}
|
|
3644
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
|
|
3645
|
+
const localVarHeaderParameter = {};
|
|
3646
|
+
const localVarQueryParameter = {};
|
|
3647
|
+
// authentication bearerAuth required
|
|
3648
|
+
// http bearer authentication required
|
|
3649
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
3650
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
3651
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
3652
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3653
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3654
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(cancelOrdersRequest, localVarRequestOptions, configuration);
|
|
3655
|
+
return {
|
|
3656
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
3657
|
+
options: localVarRequestOptions,
|
|
3658
|
+
};
|
|
3659
|
+
}),
|
|
3660
|
+
/**
|
|
3661
|
+
* Retrieve details of open orders for a specific account.
|
|
3662
|
+
* @summary /trade/openOrders
|
|
3663
|
+
* @param {string} [symbol] Filter by specific perpetual symbol (optional)
|
|
3664
|
+
* @param {*} [options] Override http request option.
|
|
3665
|
+
* @throws {RequiredError}
|
|
3666
|
+
*/
|
|
3667
|
+
getOpenOrders: (symbol_1, ...args_1) => __awaiter(this, [symbol_1, ...args_1], void 0, function* (symbol, options = {}) {
|
|
3668
|
+
const localVarPath = `/api/v1/trade/openOrders`;
|
|
3669
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3670
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
3671
|
+
let baseOptions;
|
|
3672
|
+
if (configuration) {
|
|
3673
|
+
baseOptions = configuration.baseOptions;
|
|
3674
|
+
}
|
|
3675
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
3676
|
+
const localVarHeaderParameter = {};
|
|
3677
|
+
const localVarQueryParameter = {};
|
|
3678
|
+
// authentication bearerAuth required
|
|
3679
|
+
// http bearer authentication required
|
|
3680
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
3681
|
+
if (symbol !== undefined) {
|
|
3682
|
+
localVarQueryParameter['symbol'] = symbol;
|
|
3683
|
+
}
|
|
3684
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
3685
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3686
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3687
|
+
return {
|
|
3688
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
3689
|
+
options: localVarRequestOptions,
|
|
3690
|
+
};
|
|
3691
|
+
}),
|
|
3692
|
+
/**
|
|
3693
|
+
* Retrieve details of orders in standby for a specific account.
|
|
3694
|
+
* @summary /trade/standbyOrders
|
|
3695
|
+
* @param {string} [symbol] Filter by specific perpetual symbol (optional)
|
|
3696
|
+
* @param {*} [options] Override http request option.
|
|
3697
|
+
* @throws {RequiredError}
|
|
3698
|
+
*/
|
|
3699
|
+
getStandbyOrders: (symbol_1, ...args_1) => __awaiter(this, [symbol_1, ...args_1], void 0, function* (symbol, options = {}) {
|
|
3700
|
+
const localVarPath = `/api/v1/trade/standbyOrders`;
|
|
3701
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3702
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
3703
|
+
let baseOptions;
|
|
3704
|
+
if (configuration) {
|
|
3705
|
+
baseOptions = configuration.baseOptions;
|
|
3706
|
+
}
|
|
3707
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
3708
|
+
const localVarHeaderParameter = {};
|
|
3709
|
+
const localVarQueryParameter = {};
|
|
3710
|
+
// authentication bearerAuth required
|
|
3711
|
+
// http bearer authentication required
|
|
3712
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
3713
|
+
if (symbol !== undefined) {
|
|
3714
|
+
localVarQueryParameter['symbol'] = symbol;
|
|
3715
|
+
}
|
|
3716
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
3717
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3718
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3719
|
+
return {
|
|
3720
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
3721
|
+
options: localVarRequestOptions,
|
|
3722
|
+
};
|
|
3723
|
+
}),
|
|
3724
|
+
/**
|
|
3725
|
+
* Submit a new order for execution.
|
|
3726
|
+
* @summary /trade/orders
|
|
3727
|
+
* @param {CreateOrderRequest} createOrderRequest
|
|
3728
|
+
* @param {*} [options] Override http request option.
|
|
3729
|
+
* @throws {RequiredError}
|
|
3730
|
+
*/
|
|
3731
|
+
postCreateOrder: (createOrderRequest_1, ...args_1) => __awaiter(this, [createOrderRequest_1, ...args_1], void 0, function* (createOrderRequest, options = {}) {
|
|
3732
|
+
// verify required parameter 'createOrderRequest' is not null or undefined
|
|
3733
|
+
(0, common_1.assertParamExists)('postCreateOrder', 'createOrderRequest', createOrderRequest);
|
|
3734
|
+
const localVarPath = `/api/v1/trade/orders`;
|
|
3735
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3736
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
3737
|
+
let baseOptions;
|
|
3738
|
+
if (configuration) {
|
|
3739
|
+
baseOptions = configuration.baseOptions;
|
|
3740
|
+
}
|
|
3741
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
3742
|
+
const localVarHeaderParameter = {};
|
|
3743
|
+
const localVarQueryParameter = {};
|
|
3744
|
+
// authentication bearerAuth required
|
|
3745
|
+
// http bearer authentication required
|
|
3746
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
3747
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
3748
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
3749
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3750
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3751
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createOrderRequest, localVarRequestOptions, configuration);
|
|
3752
|
+
return {
|
|
3753
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
3754
|
+
options: localVarRequestOptions,
|
|
3755
|
+
};
|
|
3756
|
+
}),
|
|
3757
|
+
/**
|
|
3758
|
+
* Initiates a withdraw action to remove some amount of funds from a user\'s account.
|
|
3759
|
+
* @summary /trade/withdraw
|
|
3760
|
+
* @param {WithdrawRequest} withdrawRequest
|
|
3761
|
+
* @param {*} [options] Override http request option.
|
|
3762
|
+
* @throws {RequiredError}
|
|
3763
|
+
*/
|
|
3764
|
+
postWithdraw: (withdrawRequest_1, ...args_1) => __awaiter(this, [withdrawRequest_1, ...args_1], void 0, function* (withdrawRequest, options = {}) {
|
|
3765
|
+
// verify required parameter 'withdrawRequest' is not null or undefined
|
|
3766
|
+
(0, common_1.assertParamExists)('postWithdraw', 'withdrawRequest', withdrawRequest);
|
|
3767
|
+
const localVarPath = `/api/v1/trade/withdraw`;
|
|
3768
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3769
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
3770
|
+
let baseOptions;
|
|
3771
|
+
if (configuration) {
|
|
3772
|
+
baseOptions = configuration.baseOptions;
|
|
3773
|
+
}
|
|
3774
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
3775
|
+
const localVarHeaderParameter = {};
|
|
3776
|
+
const localVarQueryParameter = {};
|
|
3777
|
+
// authentication bearerAuth required
|
|
3778
|
+
// http bearer authentication required
|
|
3779
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
3780
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
3781
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
3782
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3783
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3784
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(withdrawRequest, localVarRequestOptions, configuration);
|
|
3785
|
+
return {
|
|
3786
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
3787
|
+
options: localVarRequestOptions,
|
|
3788
|
+
};
|
|
3789
|
+
}),
|
|
3790
|
+
/**
|
|
3791
|
+
* Adjust margin for an isolated position on a specific market.
|
|
3792
|
+
* @summary /trade/adjustIsolatedMargin
|
|
3793
|
+
* @param {AdjustIsolatedMarginRequest} adjustIsolatedMarginRequest
|
|
3794
|
+
* @param {*} [options] Override http request option.
|
|
3795
|
+
* @throws {RequiredError}
|
|
3796
|
+
*/
|
|
3797
|
+
putAdjustIsolatedMargin: (adjustIsolatedMarginRequest_1, ...args_1) => __awaiter(this, [adjustIsolatedMarginRequest_1, ...args_1], void 0, function* (adjustIsolatedMarginRequest, options = {}) {
|
|
3798
|
+
// verify required parameter 'adjustIsolatedMarginRequest' is not null or undefined
|
|
3799
|
+
(0, common_1.assertParamExists)('putAdjustIsolatedMargin', 'adjustIsolatedMarginRequest', adjustIsolatedMarginRequest);
|
|
3800
|
+
const localVarPath = `/api/v1/trade/adjustIsolatedMargin`;
|
|
3801
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3802
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
3803
|
+
let baseOptions;
|
|
3804
|
+
if (configuration) {
|
|
3805
|
+
baseOptions = configuration.baseOptions;
|
|
3806
|
+
}
|
|
3807
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
|
|
3808
|
+
const localVarHeaderParameter = {};
|
|
3809
|
+
const localVarQueryParameter = {};
|
|
3810
|
+
// authentication bearerAuth required
|
|
3811
|
+
// http bearer authentication required
|
|
3812
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
3813
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
3814
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
3815
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3816
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3817
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(adjustIsolatedMarginRequest, localVarRequestOptions, configuration);
|
|
3818
|
+
return {
|
|
3819
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
3820
|
+
options: localVarRequestOptions,
|
|
3821
|
+
};
|
|
3822
|
+
}),
|
|
3823
|
+
/**
|
|
3824
|
+
* Authorizes an account to trade, perform liquidations and more, on behalf of another account.
|
|
3825
|
+
* @summary /trade/accounts/authorize
|
|
3826
|
+
* @param {AccountAuthorizationRequest} accountAuthorizationRequest
|
|
3827
|
+
* @param {*} [options] Override http request option.
|
|
3828
|
+
* @throws {RequiredError}
|
|
3829
|
+
*/
|
|
3830
|
+
putAuthorizeAccount: (accountAuthorizationRequest_1, ...args_1) => __awaiter(this, [accountAuthorizationRequest_1, ...args_1], void 0, function* (accountAuthorizationRequest, options = {}) {
|
|
3831
|
+
// verify required parameter 'accountAuthorizationRequest' is not null or undefined
|
|
3832
|
+
(0, common_1.assertParamExists)('putAuthorizeAccount', 'accountAuthorizationRequest', accountAuthorizationRequest);
|
|
3833
|
+
const localVarPath = `/api/v1/trade/accounts/authorize`;
|
|
3834
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3835
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
3836
|
+
let baseOptions;
|
|
3837
|
+
if (configuration) {
|
|
3838
|
+
baseOptions = configuration.baseOptions;
|
|
3839
|
+
}
|
|
3840
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
|
|
3841
|
+
const localVarHeaderParameter = {};
|
|
3842
|
+
const localVarQueryParameter = {};
|
|
3843
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
3844
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
3845
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3846
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3847
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(accountAuthorizationRequest, localVarRequestOptions, configuration);
|
|
3848
|
+
return {
|
|
3849
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
3850
|
+
options: localVarRequestOptions,
|
|
3851
|
+
};
|
|
3852
|
+
}),
|
|
3853
|
+
/**
|
|
3854
|
+
* Deauthorizes an account to trade, perform liquidations and more, on behalf of another account.
|
|
3855
|
+
* @summary /trade/accounts/deauthorize
|
|
3856
|
+
* @param {AccountAuthorizationRequest} accountAuthorizationRequest
|
|
3857
|
+
* @param {*} [options] Override http request option.
|
|
3858
|
+
* @throws {RequiredError}
|
|
3859
|
+
*/
|
|
3860
|
+
putDeauthorizeAccount: (accountAuthorizationRequest_1, ...args_1) => __awaiter(this, [accountAuthorizationRequest_1, ...args_1], void 0, function* (accountAuthorizationRequest, options = {}) {
|
|
3861
|
+
// verify required parameter 'accountAuthorizationRequest' is not null or undefined
|
|
3862
|
+
(0, common_1.assertParamExists)('putDeauthorizeAccount', 'accountAuthorizationRequest', accountAuthorizationRequest);
|
|
3863
|
+
const localVarPath = `/api/v1/trade/accounts/deauthorize`;
|
|
3864
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3865
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
3866
|
+
let baseOptions;
|
|
3867
|
+
if (configuration) {
|
|
3868
|
+
baseOptions = configuration.baseOptions;
|
|
3869
|
+
}
|
|
3870
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
|
|
3871
|
+
const localVarHeaderParameter = {};
|
|
3872
|
+
const localVarQueryParameter = {};
|
|
3873
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
3874
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
3875
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3876
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3877
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(accountAuthorizationRequest, localVarRequestOptions, configuration);
|
|
3878
|
+
return {
|
|
3879
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
3880
|
+
options: localVarRequestOptions,
|
|
3881
|
+
};
|
|
3882
|
+
}),
|
|
3883
|
+
/**
|
|
3884
|
+
* Updates leverage for positions of a given market and closes all open orders for that market.
|
|
3885
|
+
* @summary /trade/leverage
|
|
3886
|
+
* @param {AccountPositionLeverageUpdateRequest} accountPositionLeverageUpdateRequest
|
|
3887
|
+
* @param {*} [options] Override http request option.
|
|
3888
|
+
* @throws {RequiredError}
|
|
3889
|
+
*/
|
|
3890
|
+
putLeverageUpdate: (accountPositionLeverageUpdateRequest_1, ...args_1) => __awaiter(this, [accountPositionLeverageUpdateRequest_1, ...args_1], void 0, function* (accountPositionLeverageUpdateRequest, options = {}) {
|
|
3891
|
+
// verify required parameter 'accountPositionLeverageUpdateRequest' is not null or undefined
|
|
3892
|
+
(0, common_1.assertParamExists)('putLeverageUpdate', 'accountPositionLeverageUpdateRequest', accountPositionLeverageUpdateRequest);
|
|
3893
|
+
const localVarPath = `/api/v1/trade/leverage`;
|
|
3894
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3895
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
3896
|
+
let baseOptions;
|
|
3897
|
+
if (configuration) {
|
|
3898
|
+
baseOptions = configuration.baseOptions;
|
|
3899
|
+
}
|
|
3900
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
|
|
3901
|
+
const localVarHeaderParameter = {};
|
|
3902
|
+
const localVarQueryParameter = {};
|
|
3903
|
+
// authentication bearerAuth required
|
|
3904
|
+
// http bearer authentication required
|
|
3905
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
3906
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
3907
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
3908
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3909
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3910
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(accountPositionLeverageUpdateRequest, localVarRequestOptions, configuration);
|
|
3911
|
+
return {
|
|
3912
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
3913
|
+
options: localVarRequestOptions,
|
|
3914
|
+
};
|
|
3915
|
+
}),
|
|
3916
|
+
};
|
|
3917
|
+
};
|
|
3918
|
+
exports.TradeApiAxiosParamCreator = TradeApiAxiosParamCreator;
|
|
3919
|
+
/**
|
|
3920
|
+
* TradeApi - functional programming interface
|
|
3921
|
+
* @export
|
|
3922
|
+
*/
|
|
3923
|
+
const TradeApiFp = function (configuration) {
|
|
3924
|
+
const localVarAxiosParamCreator = (0, exports.TradeApiAxiosParamCreator)(configuration);
|
|
3925
|
+
return {
|
|
3926
|
+
/**
|
|
3927
|
+
* Cancel orders for a market using order hashes. - May be a single order hash or a list of order hashes. - All orders must belong to the same account. - If no order hashes are specified, then will cancel all orders for the given market - All orders being cancelled by request will receive the same time priority.
|
|
3928
|
+
* @summary /trade/orders/cancel
|
|
3929
|
+
* @param {CancelOrdersRequest} cancelOrdersRequest
|
|
3930
|
+
* @param {*} [options] Override http request option.
|
|
3931
|
+
* @throws {RequiredError}
|
|
3932
|
+
*/
|
|
3933
|
+
cancelOrders(cancelOrdersRequest, options) {
|
|
3934
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3935
|
+
var _a, _b, _c;
|
|
3936
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.cancelOrders(cancelOrdersRequest, options);
|
|
3937
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
3938
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['TradeApi.cancelOrders']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
3939
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3940
|
+
});
|
|
3941
|
+
},
|
|
3942
|
+
/**
|
|
3943
|
+
* Cancel orders in standby for a market using order hashes. - May be a single order hash or a list of order hashes. - All orders must belong to the same account. - If no order hashes are specified, then will cancel all orders for the given market - All orders being cancelled by request will receive the same time priority.
|
|
3944
|
+
* @summary /trade/orders/cancel/standby
|
|
3945
|
+
* @param {CancelOrdersRequest} cancelOrdersRequest
|
|
3946
|
+
* @param {*} [options] Override http request option.
|
|
3947
|
+
* @throws {RequiredError}
|
|
3948
|
+
*/
|
|
3949
|
+
cancelStandbyOrders(cancelOrdersRequest, options) {
|
|
3950
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3951
|
+
var _a, _b, _c;
|
|
3952
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.cancelStandbyOrders(cancelOrdersRequest, options);
|
|
3953
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
3954
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['TradeApi.cancelStandbyOrders']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
3955
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3956
|
+
});
|
|
3957
|
+
},
|
|
3958
|
+
/**
|
|
3959
|
+
* Retrieve details of open orders for a specific account.
|
|
3960
|
+
* @summary /trade/openOrders
|
|
3961
|
+
* @param {string} [symbol] Filter by specific perpetual symbol (optional)
|
|
3962
|
+
* @param {*} [options] Override http request option.
|
|
3963
|
+
* @throws {RequiredError}
|
|
3964
|
+
*/
|
|
3965
|
+
getOpenOrders(symbol, options) {
|
|
3966
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3967
|
+
var _a, _b, _c;
|
|
3968
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getOpenOrders(symbol, options);
|
|
3969
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
3970
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['TradeApi.getOpenOrders']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
3971
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3972
|
+
});
|
|
3973
|
+
},
|
|
3974
|
+
/**
|
|
3975
|
+
* Retrieve details of orders in standby for a specific account.
|
|
3976
|
+
* @summary /trade/standbyOrders
|
|
3977
|
+
* @param {string} [symbol] Filter by specific perpetual symbol (optional)
|
|
3978
|
+
* @param {*} [options] Override http request option.
|
|
3979
|
+
* @throws {RequiredError}
|
|
3980
|
+
*/
|
|
3981
|
+
getStandbyOrders(symbol, options) {
|
|
3982
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3983
|
+
var _a, _b, _c;
|
|
3984
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getStandbyOrders(symbol, options);
|
|
3985
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
3986
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['TradeApi.getStandbyOrders']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
3987
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3988
|
+
});
|
|
3989
|
+
},
|
|
3990
|
+
/**
|
|
3991
|
+
* Submit a new order for execution.
|
|
3992
|
+
* @summary /trade/orders
|
|
3993
|
+
* @param {CreateOrderRequest} createOrderRequest
|
|
3994
|
+
* @param {*} [options] Override http request option.
|
|
3995
|
+
* @throws {RequiredError}
|
|
3996
|
+
*/
|
|
3997
|
+
postCreateOrder(createOrderRequest, options) {
|
|
3998
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3999
|
+
var _a, _b, _c;
|
|
4000
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.postCreateOrder(createOrderRequest, options);
|
|
4001
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
4002
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['TradeApi.postCreateOrder']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
4003
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4004
|
+
});
|
|
4005
|
+
},
|
|
4006
|
+
/**
|
|
4007
|
+
* Initiates a withdraw action to remove some amount of funds from a user\'s account.
|
|
4008
|
+
* @summary /trade/withdraw
|
|
4009
|
+
* @param {WithdrawRequest} withdrawRequest
|
|
4010
|
+
* @param {*} [options] Override http request option.
|
|
4011
|
+
* @throws {RequiredError}
|
|
4012
|
+
*/
|
|
4013
|
+
postWithdraw(withdrawRequest, options) {
|
|
4014
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4015
|
+
var _a, _b, _c;
|
|
4016
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.postWithdraw(withdrawRequest, options);
|
|
4017
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
4018
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['TradeApi.postWithdraw']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
4019
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4020
|
+
});
|
|
4021
|
+
},
|
|
4022
|
+
/**
|
|
4023
|
+
* Adjust margin for an isolated position on a specific market.
|
|
4024
|
+
* @summary /trade/adjustIsolatedMargin
|
|
4025
|
+
* @param {AdjustIsolatedMarginRequest} adjustIsolatedMarginRequest
|
|
4026
|
+
* @param {*} [options] Override http request option.
|
|
4027
|
+
* @throws {RequiredError}
|
|
4028
|
+
*/
|
|
4029
|
+
putAdjustIsolatedMargin(adjustIsolatedMarginRequest, options) {
|
|
4030
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4031
|
+
var _a, _b, _c;
|
|
4032
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.putAdjustIsolatedMargin(adjustIsolatedMarginRequest, options);
|
|
4033
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
4034
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['TradeApi.putAdjustIsolatedMargin']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
4035
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4036
|
+
});
|
|
4037
|
+
},
|
|
4038
|
+
/**
|
|
4039
|
+
* Authorizes an account to trade, perform liquidations and more, on behalf of another account.
|
|
4040
|
+
* @summary /trade/accounts/authorize
|
|
4041
|
+
* @param {AccountAuthorizationRequest} accountAuthorizationRequest
|
|
4042
|
+
* @param {*} [options] Override http request option.
|
|
4043
|
+
* @throws {RequiredError}
|
|
4044
|
+
*/
|
|
4045
|
+
putAuthorizeAccount(accountAuthorizationRequest, options) {
|
|
4046
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4047
|
+
var _a, _b, _c;
|
|
4048
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.putAuthorizeAccount(accountAuthorizationRequest, options);
|
|
4049
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
4050
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['TradeApi.putAuthorizeAccount']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
4051
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4052
|
+
});
|
|
4053
|
+
},
|
|
4054
|
+
/**
|
|
4055
|
+
* Deauthorizes an account to trade, perform liquidations and more, on behalf of another account.
|
|
4056
|
+
* @summary /trade/accounts/deauthorize
|
|
4057
|
+
* @param {AccountAuthorizationRequest} accountAuthorizationRequest
|
|
4058
|
+
* @param {*} [options] Override http request option.
|
|
4059
|
+
* @throws {RequiredError}
|
|
4060
|
+
*/
|
|
4061
|
+
putDeauthorizeAccount(accountAuthorizationRequest, options) {
|
|
4062
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4063
|
+
var _a, _b, _c;
|
|
4064
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.putDeauthorizeAccount(accountAuthorizationRequest, options);
|
|
4065
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
4066
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['TradeApi.putDeauthorizeAccount']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
4067
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4068
|
+
});
|
|
4069
|
+
},
|
|
4070
|
+
/**
|
|
4071
|
+
* Updates leverage for positions of a given market and closes all open orders for that market.
|
|
4072
|
+
* @summary /trade/leverage
|
|
4073
|
+
* @param {AccountPositionLeverageUpdateRequest} accountPositionLeverageUpdateRequest
|
|
4074
|
+
* @param {*} [options] Override http request option.
|
|
4075
|
+
* @throws {RequiredError}
|
|
4076
|
+
*/
|
|
4077
|
+
putLeverageUpdate(accountPositionLeverageUpdateRequest, options) {
|
|
4078
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4079
|
+
var _a, _b, _c;
|
|
4080
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.putLeverageUpdate(accountPositionLeverageUpdateRequest, options);
|
|
4081
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
4082
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['TradeApi.putLeverageUpdate']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
4083
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4084
|
+
});
|
|
4085
|
+
},
|
|
4086
|
+
};
|
|
4087
|
+
};
|
|
4088
|
+
exports.TradeApiFp = TradeApiFp;
|
|
4089
|
+
/**
|
|
4090
|
+
* TradeApi - factory interface
|
|
4091
|
+
* @export
|
|
4092
|
+
*/
|
|
4093
|
+
const TradeApiFactory = function (configuration, basePath, axios) {
|
|
4094
|
+
const localVarFp = (0, exports.TradeApiFp)(configuration);
|
|
4095
|
+
return {
|
|
4096
|
+
/**
|
|
4097
|
+
* Cancel orders for a market using order hashes. - May be a single order hash or a list of order hashes. - All orders must belong to the same account. - If no order hashes are specified, then will cancel all orders for the given market - All orders being cancelled by request will receive the same time priority.
|
|
4098
|
+
* @summary /trade/orders/cancel
|
|
4099
|
+
* @param {CancelOrdersRequest} cancelOrdersRequest
|
|
4100
|
+
* @param {*} [options] Override http request option.
|
|
4101
|
+
* @throws {RequiredError}
|
|
4102
|
+
*/
|
|
4103
|
+
cancelOrders(cancelOrdersRequest, options) {
|
|
4104
|
+
return localVarFp.cancelOrders(cancelOrdersRequest, options).then((request) => request(axios, basePath));
|
|
4105
|
+
},
|
|
4106
|
+
/**
|
|
4107
|
+
* Cancel orders in standby for a market using order hashes. - May be a single order hash or a list of order hashes. - All orders must belong to the same account. - If no order hashes are specified, then will cancel all orders for the given market - All orders being cancelled by request will receive the same time priority.
|
|
4108
|
+
* @summary /trade/orders/cancel/standby
|
|
4109
|
+
* @param {CancelOrdersRequest} cancelOrdersRequest
|
|
4110
|
+
* @param {*} [options] Override http request option.
|
|
4111
|
+
* @throws {RequiredError}
|
|
4112
|
+
*/
|
|
4113
|
+
cancelStandbyOrders(cancelOrdersRequest, options) {
|
|
4114
|
+
return localVarFp.cancelStandbyOrders(cancelOrdersRequest, options).then((request) => request(axios, basePath));
|
|
4115
|
+
},
|
|
4116
|
+
/**
|
|
4117
|
+
* Retrieve details of open orders for a specific account.
|
|
4118
|
+
* @summary /trade/openOrders
|
|
4119
|
+
* @param {string} [symbol] Filter by specific perpetual symbol (optional)
|
|
4120
|
+
* @param {*} [options] Override http request option.
|
|
4121
|
+
* @throws {RequiredError}
|
|
4122
|
+
*/
|
|
4123
|
+
getOpenOrders(symbol, options) {
|
|
4124
|
+
return localVarFp.getOpenOrders(symbol, options).then((request) => request(axios, basePath));
|
|
4125
|
+
},
|
|
4126
|
+
/**
|
|
4127
|
+
* Retrieve details of orders in standby for a specific account.
|
|
4128
|
+
* @summary /trade/standbyOrders
|
|
4129
|
+
* @param {string} [symbol] Filter by specific perpetual symbol (optional)
|
|
4130
|
+
* @param {*} [options] Override http request option.
|
|
4131
|
+
* @throws {RequiredError}
|
|
4132
|
+
*/
|
|
4133
|
+
getStandbyOrders(symbol, options) {
|
|
4134
|
+
return localVarFp.getStandbyOrders(symbol, options).then((request) => request(axios, basePath));
|
|
4135
|
+
},
|
|
4136
|
+
/**
|
|
4137
|
+
* Submit a new order for execution.
|
|
4138
|
+
* @summary /trade/orders
|
|
4139
|
+
* @param {CreateOrderRequest} createOrderRequest
|
|
4140
|
+
* @param {*} [options] Override http request option.
|
|
4141
|
+
* @throws {RequiredError}
|
|
4142
|
+
*/
|
|
4143
|
+
postCreateOrder(createOrderRequest, options) {
|
|
4144
|
+
return localVarFp.postCreateOrder(createOrderRequest, options).then((request) => request(axios, basePath));
|
|
4145
|
+
},
|
|
4146
|
+
/**
|
|
4147
|
+
* Initiates a withdraw action to remove some amount of funds from a user\'s account.
|
|
4148
|
+
* @summary /trade/withdraw
|
|
4149
|
+
* @param {WithdrawRequest} withdrawRequest
|
|
4150
|
+
* @param {*} [options] Override http request option.
|
|
4151
|
+
* @throws {RequiredError}
|
|
4152
|
+
*/
|
|
4153
|
+
postWithdraw(withdrawRequest, options) {
|
|
4154
|
+
return localVarFp.postWithdraw(withdrawRequest, options).then((request) => request(axios, basePath));
|
|
4155
|
+
},
|
|
4156
|
+
/**
|
|
4157
|
+
* Adjust margin for an isolated position on a specific market.
|
|
4158
|
+
* @summary /trade/adjustIsolatedMargin
|
|
4159
|
+
* @param {AdjustIsolatedMarginRequest} adjustIsolatedMarginRequest
|
|
4160
|
+
* @param {*} [options] Override http request option.
|
|
4161
|
+
* @throws {RequiredError}
|
|
4162
|
+
*/
|
|
4163
|
+
putAdjustIsolatedMargin(adjustIsolatedMarginRequest, options) {
|
|
4164
|
+
return localVarFp.putAdjustIsolatedMargin(adjustIsolatedMarginRequest, options).then((request) => request(axios, basePath));
|
|
4165
|
+
},
|
|
4166
|
+
/**
|
|
4167
|
+
* Authorizes an account to trade, perform liquidations and more, on behalf of another account.
|
|
4168
|
+
* @summary /trade/accounts/authorize
|
|
4169
|
+
* @param {AccountAuthorizationRequest} accountAuthorizationRequest
|
|
4170
|
+
* @param {*} [options] Override http request option.
|
|
4171
|
+
* @throws {RequiredError}
|
|
4172
|
+
*/
|
|
4173
|
+
putAuthorizeAccount(accountAuthorizationRequest, options) {
|
|
4174
|
+
return localVarFp.putAuthorizeAccount(accountAuthorizationRequest, options).then((request) => request(axios, basePath));
|
|
4175
|
+
},
|
|
4176
|
+
/**
|
|
4177
|
+
* Deauthorizes an account to trade, perform liquidations and more, on behalf of another account.
|
|
4178
|
+
* @summary /trade/accounts/deauthorize
|
|
4179
|
+
* @param {AccountAuthorizationRequest} accountAuthorizationRequest
|
|
4180
|
+
* @param {*} [options] Override http request option.
|
|
4181
|
+
* @throws {RequiredError}
|
|
4182
|
+
*/
|
|
4183
|
+
putDeauthorizeAccount(accountAuthorizationRequest, options) {
|
|
4184
|
+
return localVarFp.putDeauthorizeAccount(accountAuthorizationRequest, options).then((request) => request(axios, basePath));
|
|
4185
|
+
},
|
|
4186
|
+
/**
|
|
4187
|
+
* Updates leverage for positions of a given market and closes all open orders for that market.
|
|
4188
|
+
* @summary /trade/leverage
|
|
4189
|
+
* @param {AccountPositionLeverageUpdateRequest} accountPositionLeverageUpdateRequest
|
|
4190
|
+
* @param {*} [options] Override http request option.
|
|
4191
|
+
* @throws {RequiredError}
|
|
4192
|
+
*/
|
|
4193
|
+
putLeverageUpdate(accountPositionLeverageUpdateRequest, options) {
|
|
4194
|
+
return localVarFp.putLeverageUpdate(accountPositionLeverageUpdateRequest, options).then((request) => request(axios, basePath));
|
|
4195
|
+
},
|
|
4196
|
+
};
|
|
4197
|
+
};
|
|
4198
|
+
exports.TradeApiFactory = TradeApiFactory;
|
|
4199
|
+
/**
|
|
4200
|
+
* TradeApi - object-oriented interface
|
|
4201
|
+
* @export
|
|
4202
|
+
* @class TradeApi
|
|
4203
|
+
* @extends {BaseAPI}
|
|
4204
|
+
*/
|
|
4205
|
+
class TradeApi extends base_1.BaseAPI {
|
|
4206
|
+
/**
|
|
4207
|
+
* Cancel orders for a market using order hashes. - May be a single order hash or a list of order hashes. - All orders must belong to the same account. - If no order hashes are specified, then will cancel all orders for the given market - All orders being cancelled by request will receive the same time priority.
|
|
4208
|
+
* @summary /trade/orders/cancel
|
|
4209
|
+
* @param {CancelOrdersRequest} cancelOrdersRequest
|
|
4210
|
+
* @param {*} [options] Override http request option.
|
|
4211
|
+
* @throws {RequiredError}
|
|
4212
|
+
* @memberof TradeApi
|
|
4213
|
+
*/
|
|
4214
|
+
cancelOrders(cancelOrdersRequest, options) {
|
|
4215
|
+
return (0, exports.TradeApiFp)(this.configuration).cancelOrders(cancelOrdersRequest, options).then((request) => request(this.axios, this.basePath));
|
|
4216
|
+
}
|
|
4217
|
+
/**
|
|
4218
|
+
* Cancel orders in standby for a market using order hashes. - May be a single order hash or a list of order hashes. - All orders must belong to the same account. - If no order hashes are specified, then will cancel all orders for the given market - All orders being cancelled by request will receive the same time priority.
|
|
4219
|
+
* @summary /trade/orders/cancel/standby
|
|
4220
|
+
* @param {CancelOrdersRequest} cancelOrdersRequest
|
|
4221
|
+
* @param {*} [options] Override http request option.
|
|
4222
|
+
* @throws {RequiredError}
|
|
4223
|
+
* @memberof TradeApi
|
|
4224
|
+
*/
|
|
4225
|
+
cancelStandbyOrders(cancelOrdersRequest, options) {
|
|
4226
|
+
return (0, exports.TradeApiFp)(this.configuration).cancelStandbyOrders(cancelOrdersRequest, options).then((request) => request(this.axios, this.basePath));
|
|
4227
|
+
}
|
|
4228
|
+
/**
|
|
4229
|
+
* Retrieve details of open orders for a specific account.
|
|
4230
|
+
* @summary /trade/openOrders
|
|
4231
|
+
* @param {string} [symbol] Filter by specific perpetual symbol (optional)
|
|
4232
|
+
* @param {*} [options] Override http request option.
|
|
4233
|
+
* @throws {RequiredError}
|
|
4234
|
+
* @memberof TradeApi
|
|
4235
|
+
*/
|
|
4236
|
+
getOpenOrders(symbol, options) {
|
|
4237
|
+
return (0, exports.TradeApiFp)(this.configuration).getOpenOrders(symbol, options).then((request) => request(this.axios, this.basePath));
|
|
4238
|
+
}
|
|
4239
|
+
/**
|
|
4240
|
+
* Retrieve details of orders in standby for a specific account.
|
|
4241
|
+
* @summary /trade/standbyOrders
|
|
4242
|
+
* @param {string} [symbol] Filter by specific perpetual symbol (optional)
|
|
4243
|
+
* @param {*} [options] Override http request option.
|
|
4244
|
+
* @throws {RequiredError}
|
|
4245
|
+
* @memberof TradeApi
|
|
4246
|
+
*/
|
|
4247
|
+
getStandbyOrders(symbol, options) {
|
|
4248
|
+
return (0, exports.TradeApiFp)(this.configuration).getStandbyOrders(symbol, options).then((request) => request(this.axios, this.basePath));
|
|
4249
|
+
}
|
|
4250
|
+
/**
|
|
4251
|
+
* Submit a new order for execution.
|
|
4252
|
+
* @summary /trade/orders
|
|
4253
|
+
* @param {CreateOrderRequest} createOrderRequest
|
|
4254
|
+
* @param {*} [options] Override http request option.
|
|
4255
|
+
* @throws {RequiredError}
|
|
4256
|
+
* @memberof TradeApi
|
|
4257
|
+
*/
|
|
4258
|
+
postCreateOrder(createOrderRequest, options) {
|
|
4259
|
+
return (0, exports.TradeApiFp)(this.configuration).postCreateOrder(createOrderRequest, options).then((request) => request(this.axios, this.basePath));
|
|
4260
|
+
}
|
|
4261
|
+
/**
|
|
4262
|
+
* Initiates a withdraw action to remove some amount of funds from a user\'s account.
|
|
4263
|
+
* @summary /trade/withdraw
|
|
4264
|
+
* @param {WithdrawRequest} withdrawRequest
|
|
4265
|
+
* @param {*} [options] Override http request option.
|
|
4266
|
+
* @throws {RequiredError}
|
|
4267
|
+
* @memberof TradeApi
|
|
4268
|
+
*/
|
|
4269
|
+
postWithdraw(withdrawRequest, options) {
|
|
4270
|
+
return (0, exports.TradeApiFp)(this.configuration).postWithdraw(withdrawRequest, options).then((request) => request(this.axios, this.basePath));
|
|
4271
|
+
}
|
|
4272
|
+
/**
|
|
4273
|
+
* Adjust margin for an isolated position on a specific market.
|
|
4274
|
+
* @summary /trade/adjustIsolatedMargin
|
|
4275
|
+
* @param {AdjustIsolatedMarginRequest} adjustIsolatedMarginRequest
|
|
4276
|
+
* @param {*} [options] Override http request option.
|
|
4277
|
+
* @throws {RequiredError}
|
|
4278
|
+
* @memberof TradeApi
|
|
4279
|
+
*/
|
|
4280
|
+
putAdjustIsolatedMargin(adjustIsolatedMarginRequest, options) {
|
|
4281
|
+
return (0, exports.TradeApiFp)(this.configuration).putAdjustIsolatedMargin(adjustIsolatedMarginRequest, options).then((request) => request(this.axios, this.basePath));
|
|
4282
|
+
}
|
|
4283
|
+
/**
|
|
4284
|
+
* Authorizes an account to trade, perform liquidations and more, on behalf of another account.
|
|
4285
|
+
* @summary /trade/accounts/authorize
|
|
4286
|
+
* @param {AccountAuthorizationRequest} accountAuthorizationRequest
|
|
4287
|
+
* @param {*} [options] Override http request option.
|
|
4288
|
+
* @throws {RequiredError}
|
|
4289
|
+
* @memberof TradeApi
|
|
4290
|
+
*/
|
|
4291
|
+
putAuthorizeAccount(accountAuthorizationRequest, options) {
|
|
4292
|
+
return (0, exports.TradeApiFp)(this.configuration).putAuthorizeAccount(accountAuthorizationRequest, options).then((request) => request(this.axios, this.basePath));
|
|
4293
|
+
}
|
|
4294
|
+
/**
|
|
4295
|
+
* Deauthorizes an account to trade, perform liquidations and more, on behalf of another account.
|
|
4296
|
+
* @summary /trade/accounts/deauthorize
|
|
4297
|
+
* @param {AccountAuthorizationRequest} accountAuthorizationRequest
|
|
4298
|
+
* @param {*} [options] Override http request option.
|
|
4299
|
+
* @throws {RequiredError}
|
|
4300
|
+
* @memberof TradeApi
|
|
4301
|
+
*/
|
|
4302
|
+
putDeauthorizeAccount(accountAuthorizationRequest, options) {
|
|
4303
|
+
return (0, exports.TradeApiFp)(this.configuration).putDeauthorizeAccount(accountAuthorizationRequest, options).then((request) => request(this.axios, this.basePath));
|
|
4304
|
+
}
|
|
4305
|
+
/**
|
|
4306
|
+
* Updates leverage for positions of a given market and closes all open orders for that market.
|
|
4307
|
+
* @summary /trade/leverage
|
|
4308
|
+
* @param {AccountPositionLeverageUpdateRequest} accountPositionLeverageUpdateRequest
|
|
4309
|
+
* @param {*} [options] Override http request option.
|
|
4310
|
+
* @throws {RequiredError}
|
|
4311
|
+
* @memberof TradeApi
|
|
4312
|
+
*/
|
|
4313
|
+
putLeverageUpdate(accountPositionLeverageUpdateRequest, options) {
|
|
4314
|
+
return (0, exports.TradeApiFp)(this.configuration).putLeverageUpdate(accountPositionLeverageUpdateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
4315
|
+
}
|
|
4316
|
+
}
|
|
4317
|
+
exports.TradeApi = TradeApi;
|
|
4318
|
+
//# sourceMappingURL=api.js.map
|