@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
|
@@ -1,374 +0,0 @@
|
|
|
1
|
-
# AccountDataApi
|
|
2
|
-
|
|
3
|
-
All URIs are relative to *https://api.sui-staging.bluefin.io*
|
|
4
|
-
|
|
5
|
-
|Method | HTTP request | Description|
|
|
6
|
-
|------------- | ------------- | -------------|
|
|
7
|
-
|[**getAccountDetails**](#getaccountdetails) | **GET** /api/v1/account | /account|
|
|
8
|
-
|[**getAccountFundingRateHistory**](#getaccountfundingratehistory) | **GET** /api/v1/account/fundingRateHistory | /account/fundingRateHistory|
|
|
9
|
-
|[**getAccountPreferences**](#getaccountpreferences) | **GET** /api/v1/account/preferences | /account/preferences|
|
|
10
|
-
|[**getAccountTrades**](#getaccounttrades) | **GET** /api/v1/account/trades | /account/trades|
|
|
11
|
-
|[**getAccountTransactionHistory**](#getaccounttransactionhistory) | **GET** /api/v1/account/transactions | /account/transactions|
|
|
12
|
-
|[**putAccountPreferences**](#putaccountpreferences) | **PUT** /api/v1/account/preferences | /account/preferences|
|
|
13
|
-
|
|
14
|
-
# **getAccountDetails**
|
|
15
|
-
> Account getAccountDetails()
|
|
16
|
-
|
|
17
|
-
Retrieves the user\'s account details.
|
|
18
|
-
|
|
19
|
-
### Example
|
|
20
|
-
|
|
21
|
-
```typescript
|
|
22
|
-
import {
|
|
23
|
-
AccountDataApi,
|
|
24
|
-
Configuration
|
|
25
|
-
} from '@bluefin/api-client';
|
|
26
|
-
|
|
27
|
-
const configuration = new Configuration();
|
|
28
|
-
const apiInstance = new AccountDataApi(configuration);
|
|
29
|
-
|
|
30
|
-
let accountAddress: string; //Account address to fetch account details by. (optional) (default to undefined)
|
|
31
|
-
|
|
32
|
-
const { status, data } = await apiInstance.getAccountDetails(
|
|
33
|
-
accountAddress
|
|
34
|
-
);
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
### Parameters
|
|
38
|
-
|
|
39
|
-
|Name | Type | Description | Notes|
|
|
40
|
-
|------------- | ------------- | ------------- | -------------|
|
|
41
|
-
| **accountAddress** | [**string**] | Account address to fetch account details by. | (optional) defaults to undefined|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
### Return type
|
|
45
|
-
|
|
46
|
-
**Account**
|
|
47
|
-
|
|
48
|
-
### Authorization
|
|
49
|
-
|
|
50
|
-
No authorization required
|
|
51
|
-
|
|
52
|
-
### HTTP request headers
|
|
53
|
-
|
|
54
|
-
- **Content-Type**: Not defined
|
|
55
|
-
- **Accept**: application/json
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
### HTTP response details
|
|
59
|
-
| Status code | Description | Response headers |
|
|
60
|
-
|-------------|-------------|------------------|
|
|
61
|
-
|**200** | Successful response with account details. | - |
|
|
62
|
-
|**400** | request missing required parameters | - |
|
|
63
|
-
|**401** | unauthorized access | - |
|
|
64
|
-
|**404** | account not found | - |
|
|
65
|
-
|**500** | internal server error | - |
|
|
66
|
-
|
|
67
|
-
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
68
|
-
|
|
69
|
-
# **getAccountFundingRateHistory**
|
|
70
|
-
> AccountFundingRateHistory getAccountFundingRateHistory()
|
|
71
|
-
|
|
72
|
-
Retrieves the funding rate history for a specific account.
|
|
73
|
-
|
|
74
|
-
### Example
|
|
75
|
-
|
|
76
|
-
```typescript
|
|
77
|
-
import {
|
|
78
|
-
AccountDataApi,
|
|
79
|
-
Configuration
|
|
80
|
-
} from '@bluefin/api-client';
|
|
81
|
-
|
|
82
|
-
const configuration = new Configuration();
|
|
83
|
-
const apiInstance = new AccountDataApi(configuration);
|
|
84
|
-
|
|
85
|
-
let accountAddress: string; //Account address to filter funding rate history by. (optional) (default to undefined)
|
|
86
|
-
let limit: number; //Default 500; max 1000. (optional) (default to 500)
|
|
87
|
-
let page: number; //The page number to retrieve in a paginated response. (optional) (default to 1)
|
|
88
|
-
|
|
89
|
-
const { status, data } = await apiInstance.getAccountFundingRateHistory(
|
|
90
|
-
accountAddress,
|
|
91
|
-
limit,
|
|
92
|
-
page
|
|
93
|
-
);
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
### Parameters
|
|
97
|
-
|
|
98
|
-
|Name | Type | Description | Notes|
|
|
99
|
-
|------------- | ------------- | ------------- | -------------|
|
|
100
|
-
| **accountAddress** | [**string**] | Account address to filter funding rate history by. | (optional) defaults to undefined|
|
|
101
|
-
| **limit** | [**number**] | Default 500; max 1000. | (optional) defaults to 500|
|
|
102
|
-
| **page** | [**number**] | The page number to retrieve in a paginated response. | (optional) defaults to 1|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
### Return type
|
|
106
|
-
|
|
107
|
-
**AccountFundingRateHistory**
|
|
108
|
-
|
|
109
|
-
### Authorization
|
|
110
|
-
|
|
111
|
-
[bearerAuth](../README.md#bearerAuth)
|
|
112
|
-
|
|
113
|
-
### HTTP request headers
|
|
114
|
-
|
|
115
|
-
- **Content-Type**: Not defined
|
|
116
|
-
- **Accept**: application/json
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
### HTTP response details
|
|
120
|
-
| Status code | Description | Response headers |
|
|
121
|
-
|-------------|-------------|------------------|
|
|
122
|
-
|**200** | Successful response with funding rate history. | - |
|
|
123
|
-
|**400** | request missing required parameters | - |
|
|
124
|
-
|**401** | unauthorized access | - |
|
|
125
|
-
|**404** | account not found | - |
|
|
126
|
-
|**500** | internal server error | - |
|
|
127
|
-
|
|
128
|
-
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
129
|
-
|
|
130
|
-
# **getAccountPreferences**
|
|
131
|
-
> AccountPreference getAccountPreferences()
|
|
132
|
-
|
|
133
|
-
Retrieves the user\'s account preferences.
|
|
134
|
-
|
|
135
|
-
### Example
|
|
136
|
-
|
|
137
|
-
```typescript
|
|
138
|
-
import {
|
|
139
|
-
AccountDataApi,
|
|
140
|
-
Configuration
|
|
141
|
-
} from '@bluefin/api-client';
|
|
142
|
-
|
|
143
|
-
const configuration = new Configuration();
|
|
144
|
-
const apiInstance = new AccountDataApi(configuration);
|
|
145
|
-
|
|
146
|
-
const { status, data } = await apiInstance.getAccountPreferences();
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
### Parameters
|
|
150
|
-
This endpoint does not have any parameters.
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
### Return type
|
|
154
|
-
|
|
155
|
-
**AccountPreference**
|
|
156
|
-
|
|
157
|
-
### Authorization
|
|
158
|
-
|
|
159
|
-
[bearerAuth](../README.md#bearerAuth)
|
|
160
|
-
|
|
161
|
-
### HTTP request headers
|
|
162
|
-
|
|
163
|
-
- **Content-Type**: Not defined
|
|
164
|
-
- **Accept**: application/json
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
### HTTP response details
|
|
168
|
-
| Status code | Description | Response headers |
|
|
169
|
-
|-------------|-------------|------------------|
|
|
170
|
-
|**200** | Successful response with account preferences. | - |
|
|
171
|
-
|**400** | request missing required parameters | - |
|
|
172
|
-
|**401** | unauthorized access | - |
|
|
173
|
-
|**404** | account not found | - |
|
|
174
|
-
|**500** | internal server error | - |
|
|
175
|
-
|
|
176
|
-
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
177
|
-
|
|
178
|
-
# **getAccountTrades**
|
|
179
|
-
> Array<Trade> getAccountTrades()
|
|
180
|
-
|
|
181
|
-
Retrieves the user\'s trade history.
|
|
182
|
-
|
|
183
|
-
### Example
|
|
184
|
-
|
|
185
|
-
```typescript
|
|
186
|
-
import {
|
|
187
|
-
AccountDataApi,
|
|
188
|
-
Configuration
|
|
189
|
-
} from '@bluefin/api-client';
|
|
190
|
-
|
|
191
|
-
const configuration = new Configuration();
|
|
192
|
-
const apiInstance = new AccountDataApi(configuration);
|
|
193
|
-
|
|
194
|
-
let symbol: string; //Market address to filter trades by. If not specified, returns trades for all markets. (optional) (default to undefined)
|
|
195
|
-
let startTimeAtMillis: number; //Start time in milliseconds. Defaults to 7 days ago if not specified. (optional) (default to undefined)
|
|
196
|
-
let endTimeAtMillis: number; //End time in milliseconds. Defaults to now if not specified. Must be greater than start time and must be less than 7 days apart. (optional) (default to undefined)
|
|
197
|
-
let limit: number; //Default 500; max 1000. (optional) (default to 500)
|
|
198
|
-
let tradeType: TradeType; //Type of trade. By default returns all. UNSPECIFIED returns all. (optional) (default to undefined)
|
|
199
|
-
let page: number; //The page number to retrieve in a paginated response. (optional) (default to undefined)
|
|
200
|
-
|
|
201
|
-
const { status, data } = await apiInstance.getAccountTrades(
|
|
202
|
-
symbol,
|
|
203
|
-
startTimeAtMillis,
|
|
204
|
-
endTimeAtMillis,
|
|
205
|
-
limit,
|
|
206
|
-
tradeType,
|
|
207
|
-
page
|
|
208
|
-
);
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
### Parameters
|
|
212
|
-
|
|
213
|
-
|Name | Type | Description | Notes|
|
|
214
|
-
|------------- | ------------- | ------------- | -------------|
|
|
215
|
-
| **symbol** | [**string**] | Market address to filter trades by. If not specified, returns trades for all markets. | (optional) defaults to undefined|
|
|
216
|
-
| **startTimeAtMillis** | [**number**] | Start time in milliseconds. Defaults to 7 days ago if not specified. | (optional) defaults to undefined|
|
|
217
|
-
| **endTimeAtMillis** | [**number**] | End time in milliseconds. Defaults to now if not specified. Must be greater than start time and must be less than 7 days apart. | (optional) defaults to undefined|
|
|
218
|
-
| **limit** | [**number**] | Default 500; max 1000. | (optional) defaults to 500|
|
|
219
|
-
| **tradeType** | **TradeType** | Type of trade. By default returns all. UNSPECIFIED returns all. | (optional) defaults to undefined|
|
|
220
|
-
| **page** | [**number**] | The page number to retrieve in a paginated response. | (optional) defaults to undefined|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
### Return type
|
|
224
|
-
|
|
225
|
-
**Array<Trade>**
|
|
226
|
-
|
|
227
|
-
### Authorization
|
|
228
|
-
|
|
229
|
-
[bearerAuth](../README.md#bearerAuth)
|
|
230
|
-
|
|
231
|
-
### HTTP request headers
|
|
232
|
-
|
|
233
|
-
- **Content-Type**: Not defined
|
|
234
|
-
- **Accept**: application/json
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
### HTTP response details
|
|
238
|
-
| Status code | Description | Response headers |
|
|
239
|
-
|-------------|-------------|------------------|
|
|
240
|
-
|**200** | Successful response with trade details. | - |
|
|
241
|
-
|**400** | request missing required parameters | - |
|
|
242
|
-
|**401** | unauthorized access | - |
|
|
243
|
-
|**404** | account not found | - |
|
|
244
|
-
|**500** | internal server error | - |
|
|
245
|
-
|
|
246
|
-
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
247
|
-
|
|
248
|
-
# **getAccountTransactionHistory**
|
|
249
|
-
> Array<Transaction> getAccountTransactionHistory()
|
|
250
|
-
|
|
251
|
-
Retrieves the user\'s transaction history (any change in balance).
|
|
252
|
-
|
|
253
|
-
### Example
|
|
254
|
-
|
|
255
|
-
```typescript
|
|
256
|
-
import {
|
|
257
|
-
AccountDataApi,
|
|
258
|
-
Configuration
|
|
259
|
-
} from '@bluefin/api-client';
|
|
260
|
-
|
|
261
|
-
const configuration = new Configuration();
|
|
262
|
-
const apiInstance = new AccountDataApi(configuration);
|
|
263
|
-
|
|
264
|
-
let types: Array<TransactionType>; //Optional query parameter to filter transactions by type. (optional) (default to undefined)
|
|
265
|
-
let assetSymbol: string; //Optional query parameter to filter transactions by asset bank address. (optional) (default to undefined)
|
|
266
|
-
let startTimeAtMillis: number; //Start time in milliseconds. Defaults to 7 days ago if not specified. (optional) (default to undefined)
|
|
267
|
-
let endTimeAtMillis: number; //End time in milliseconds. Defaults to now if not specified. Must be greater than start time and must be less than 7 days apart. (optional) (default to undefined)
|
|
268
|
-
let limit: number; //Default 500; max 1000. (optional) (default to 500)
|
|
269
|
-
let page: number; //The page number to retrieve in a paginated response. (optional) (default to undefined)
|
|
270
|
-
|
|
271
|
-
const { status, data } = await apiInstance.getAccountTransactionHistory(
|
|
272
|
-
types,
|
|
273
|
-
assetSymbol,
|
|
274
|
-
startTimeAtMillis,
|
|
275
|
-
endTimeAtMillis,
|
|
276
|
-
limit,
|
|
277
|
-
page
|
|
278
|
-
);
|
|
279
|
-
```
|
|
280
|
-
|
|
281
|
-
### Parameters
|
|
282
|
-
|
|
283
|
-
|Name | Type | Description | Notes|
|
|
284
|
-
|------------- | ------------- | ------------- | -------------|
|
|
285
|
-
| **types** | **Array<TransactionType>** | Optional query parameter to filter transactions by type. | (optional) defaults to undefined|
|
|
286
|
-
| **assetSymbol** | [**string**] | Optional query parameter to filter transactions by asset bank address. | (optional) defaults to undefined|
|
|
287
|
-
| **startTimeAtMillis** | [**number**] | Start time in milliseconds. Defaults to 7 days ago if not specified. | (optional) defaults to undefined|
|
|
288
|
-
| **endTimeAtMillis** | [**number**] | End time in milliseconds. Defaults to now if not specified. Must be greater than start time and must be less than 7 days apart. | (optional) defaults to undefined|
|
|
289
|
-
| **limit** | [**number**] | Default 500; max 1000. | (optional) defaults to 500|
|
|
290
|
-
| **page** | [**number**] | The page number to retrieve in a paginated response. | (optional) defaults to undefined|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
### Return type
|
|
294
|
-
|
|
295
|
-
**Array<Transaction>**
|
|
296
|
-
|
|
297
|
-
### Authorization
|
|
298
|
-
|
|
299
|
-
[bearerAuth](../README.md#bearerAuth)
|
|
300
|
-
|
|
301
|
-
### HTTP request headers
|
|
302
|
-
|
|
303
|
-
- **Content-Type**: Not defined
|
|
304
|
-
- **Accept**: application/json
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
### HTTP response details
|
|
308
|
-
| Status code | Description | Response headers |
|
|
309
|
-
|-------------|-------------|------------------|
|
|
310
|
-
|**200** | Successful response with transaction history details. | - |
|
|
311
|
-
|**400** | request missing required parameters | - |
|
|
312
|
-
|**401** | unauthorized access | - |
|
|
313
|
-
|**404** | account not found | - |
|
|
314
|
-
|**500** | internal server error | - |
|
|
315
|
-
|
|
316
|
-
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
317
|
-
|
|
318
|
-
# **putAccountPreferences**
|
|
319
|
-
> putAccountPreferences(updateAccountPreferenceRequest)
|
|
320
|
-
|
|
321
|
-
Update user\'s account preferences. This will overwrite the preferences, so always send the full object.
|
|
322
|
-
|
|
323
|
-
### Example
|
|
324
|
-
|
|
325
|
-
```typescript
|
|
326
|
-
import {
|
|
327
|
-
AccountDataApi,
|
|
328
|
-
Configuration,
|
|
329
|
-
UpdateAccountPreferenceRequest
|
|
330
|
-
} from '@bluefin/api-client';
|
|
331
|
-
|
|
332
|
-
const configuration = new Configuration();
|
|
333
|
-
const apiInstance = new AccountDataApi(configuration);
|
|
334
|
-
|
|
335
|
-
let updateAccountPreferenceRequest: UpdateAccountPreferenceRequest; //
|
|
336
|
-
|
|
337
|
-
const { status, data } = await apiInstance.putAccountPreferences(
|
|
338
|
-
updateAccountPreferenceRequest
|
|
339
|
-
);
|
|
340
|
-
```
|
|
341
|
-
|
|
342
|
-
### Parameters
|
|
343
|
-
|
|
344
|
-
|Name | Type | Description | Notes|
|
|
345
|
-
|------------- | ------------- | ------------- | -------------|
|
|
346
|
-
| **updateAccountPreferenceRequest** | **UpdateAccountPreferenceRequest**| | |
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
### Return type
|
|
350
|
-
|
|
351
|
-
void (empty response body)
|
|
352
|
-
|
|
353
|
-
### Authorization
|
|
354
|
-
|
|
355
|
-
[bearerAuth](../README.md#bearerAuth)
|
|
356
|
-
|
|
357
|
-
### HTTP request headers
|
|
358
|
-
|
|
359
|
-
- **Content-Type**: application/json
|
|
360
|
-
- **Accept**: application/json
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
### HTTP response details
|
|
364
|
-
| Status code | Description | Response headers |
|
|
365
|
-
|-------------|-------------|------------------|
|
|
366
|
-
|**204** | Success. | - |
|
|
367
|
-
|**400** | request missing request body | - |
|
|
368
|
-
|**401** | unauthorized access | - |
|
|
369
|
-
|**404** | account not found | - |
|
|
370
|
-
|**413** | request entity too large | - |
|
|
371
|
-
|**500** | internal server error | - |
|
|
372
|
-
|
|
373
|
-
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
374
|
-
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# AccountDataStream
|
|
2
|
-
|
|
3
|
-
Represents the type of account data stream.
|
|
4
|
-
|
|
5
|
-
## Enum
|
|
6
|
-
|
|
7
|
-
* `AccountOrderUpdate` (value: `'AccountOrderUpdate'`)
|
|
8
|
-
|
|
9
|
-
* `AccountTradeUpdate` (value: `'AccountTradeUpdate'`)
|
|
10
|
-
|
|
11
|
-
* `AccountAggregatedTradeUpdate` (value: `'AccountAggregatedTradeUpdate'`)
|
|
12
|
-
|
|
13
|
-
* `AccountPositionUpdate` (value: `'AccountPositionUpdate'`)
|
|
14
|
-
|
|
15
|
-
* `AccountUpdate` (value: `'AccountUpdate'`)
|
|
16
|
-
|
|
17
|
-
* `AccountTransactionUpdate` (value: `'AccountTransactionUpdate'`)
|
|
18
|
-
|
|
19
|
-
* `AccountCommandFailureUpdate` (value: `'AccountCommandFailureUpdate'`)
|
|
20
|
-
|
|
21
|
-
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# AccountEventReason
|
|
2
|
-
|
|
3
|
-
The reason for the account-related event.
|
|
4
|
-
|
|
5
|
-
## Enum
|
|
6
|
-
|
|
7
|
-
* `Deposit` (value: `'Deposit'`)
|
|
8
|
-
|
|
9
|
-
* `Withdraw` (value: `'Withdraw'`)
|
|
10
|
-
|
|
11
|
-
* `OrderCreated` (value: `'OrderCreated'`)
|
|
12
|
-
|
|
13
|
-
* `OrderMatched` (value: `'OrderMatched'`)
|
|
14
|
-
|
|
15
|
-
* `OrderCancelled` (value: `'OrderCancelled'`)
|
|
16
|
-
|
|
17
|
-
* `OrdersForMarketCancelled` (value: `'OrdersForMarketCancelled'`)
|
|
18
|
-
|
|
19
|
-
* `LeverageUpdated` (value: `'LeverageUpdated'`)
|
|
20
|
-
|
|
21
|
-
* `IsolatedMarginUpdated` (value: `'IsolatedMarginUpdated'`)
|
|
22
|
-
|
|
23
|
-
* `FundingRatePayment` (value: `'FundingRatePayment'`)
|
|
24
|
-
|
|
25
|
-
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# AccountEventType
|
|
2
|
-
|
|
3
|
-
The type of account-related event.
|
|
4
|
-
|
|
5
|
-
## Enum
|
|
6
|
-
|
|
7
|
-
* `AccountUpdate` (value: `'AccountUpdate'`)
|
|
8
|
-
|
|
9
|
-
* `AccountTradeUpdate` (value: `'AccountTradeUpdate'`)
|
|
10
|
-
|
|
11
|
-
* `AccountAggregatedTradeUpdate` (value: `'AccountAggregatedTradeUpdate'`)
|
|
12
|
-
|
|
13
|
-
* `AccountOrderUpdate` (value: `'AccountOrderUpdate'`)
|
|
14
|
-
|
|
15
|
-
* `AccountPositionUpdate` (value: `'AccountPositionUpdate'`)
|
|
16
|
-
|
|
17
|
-
* `AccountTransactionUpdate` (value: `'AccountTransactionUpdate'`)
|
|
18
|
-
|
|
19
|
-
* `AccountCommandFailureUpdate` (value: `'AccountCommandFailureUpdate'`)
|
|
20
|
-
|
|
21
|
-
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# AccountFundingRateHistory
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
## Properties
|
|
5
|
-
|
|
6
|
-
Name | Type | Description | Notes
|
|
7
|
-
------------ | ------------- | ------------- | -------------
|
|
8
|
-
**data** | [**Array<AccountFundingRateHistoryData>**](AccountFundingRateHistoryData.md) | | [default to undefined]
|
|
9
|
-
|
|
10
|
-
## Example
|
|
11
|
-
|
|
12
|
-
```typescript
|
|
13
|
-
import { AccountFundingRateHistory } from '@bluefin/api-client';
|
|
14
|
-
|
|
15
|
-
const instance: AccountFundingRateHistory = {
|
|
16
|
-
data,
|
|
17
|
-
};
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# AccountFundingRateHistoryData
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
## Properties
|
|
5
|
-
|
|
6
|
-
Name | Type | Description | Notes
|
|
7
|
-
------------ | ------------- | ------------- | -------------
|
|
8
|
-
**paymentAmountE9** | **string** | Payment amount in e9 format. | [default to undefined]
|
|
9
|
-
**positionSide** | [**PositionSide**](PositionSide.md) | | [default to undefined]
|
|
10
|
-
**rateE9** | **string** | Funding rate value (e9 format). | [default to undefined]
|
|
11
|
-
**symbol** | **string** | Market address. | [default to undefined]
|
|
12
|
-
**executedAtMillis** | **number** | Execution timestamp in milliseconds since Unix epoch. | [default to undefined]
|
|
13
|
-
**computedAtMillis** | **number** | Computed timestamp in milliseconds since Unix epoch. | [default to undefined]
|
|
14
|
-
|
|
15
|
-
## Example
|
|
16
|
-
|
|
17
|
-
```typescript
|
|
18
|
-
import { AccountFundingRateHistoryData } from '@bluefin/api-client';
|
|
19
|
-
|
|
20
|
-
const instance: AccountFundingRateHistoryData = {
|
|
21
|
-
paymentAmountE9,
|
|
22
|
-
positionSide,
|
|
23
|
-
rateE9,
|
|
24
|
-
symbol,
|
|
25
|
-
executedAtMillis,
|
|
26
|
-
computedAtMillis,
|
|
27
|
-
};
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# AccountMarketPreference
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
## Properties
|
|
5
|
-
|
|
6
|
-
Name | Type | Description | Notes
|
|
7
|
-
------------ | ------------- | ------------- | -------------
|
|
8
|
-
**marginType** | [**MarginType**](MarginType.md) | | [optional] [default to undefined]
|
|
9
|
-
**setLeverage** | **number** | User set leverage (e.g., 10x). | [optional] [default to undefined]
|
|
10
|
-
|
|
11
|
-
## Example
|
|
12
|
-
|
|
13
|
-
```typescript
|
|
14
|
-
import { AccountMarketPreference } from '@bluefin/api-client';
|
|
15
|
-
|
|
16
|
-
const instance: AccountMarketPreference = {
|
|
17
|
-
marginType,
|
|
18
|
-
setLeverage,
|
|
19
|
-
};
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
# AccountOrderUpdate
|
|
2
|
-
|
|
3
|
-
A message containing order update information.
|
|
4
|
-
|
|
5
|
-
## Properties
|
|
6
|
-
|
|
7
|
-
Name | Type | Description | Notes
|
|
8
|
-
------------ | ------------- | ------------- | -------------
|
|
9
|
-
**orderHash** | **string** | The unique hash of the order. | [default to undefined]
|
|
10
|
-
**clientOrderId** | **string** | The client-provided order ID. | [optional] [default to undefined]
|
|
11
|
-
**symbol** | **string** | The symbol of the market. | [default to undefined]
|
|
12
|
-
**accountAddress** | **string** | The address of the account. | [default to undefined]
|
|
13
|
-
**priceE9** | **string** | The price of the order in scientific notation with 9 decimal places. | [default to undefined]
|
|
14
|
-
**quantityE9** | **string** | The quantity of the order in scientific notation with 9 decimal places. | [default to undefined]
|
|
15
|
-
**filledQuantityE9** | **string** | The filled quantity of the order in scientific notation with 9 decimal places. | [default to undefined]
|
|
16
|
-
**side** | [**TradeSide**](TradeSide.md) | | [default to undefined]
|
|
17
|
-
**leverageE9** | **string** | The leverage of the order in scientific notation with 9 decimal places. | [default to undefined]
|
|
18
|
-
**isIsolated** | **boolean** | Indicates if the order is isolated. | [default to undefined]
|
|
19
|
-
**salt** | **string** | A unique salt for the order. | [default to undefined]
|
|
20
|
-
**expiresAtMillis** | **number** | The expiration timestamp of the order in milliseconds. | [default to undefined]
|
|
21
|
-
**signedAtMillis** | **number** | The signing timestamp of the order in milliseconds. | [default to undefined]
|
|
22
|
-
**signerAddress** | **string** | The address of the signer of the order request. | [default to undefined]
|
|
23
|
-
**type** | [**OrderType**](OrderType.md) | | [default to undefined]
|
|
24
|
-
**reduceOnly** | **boolean** | Indicates if the order is reduce-only. | [default to undefined]
|
|
25
|
-
**postOnly** | **boolean** | Indicates if the order is post-only. | [default to undefined]
|
|
26
|
-
**timeInForce** | [**OrderTimeInForce**](OrderTimeInForce.md) | | [default to undefined]
|
|
27
|
-
**triggerPriceE9** | **string** | The trigger price for stop-limit or stop-market orders. | [optional] [default to undefined]
|
|
28
|
-
**status** | [**OrderStatus**](OrderStatus.md) | | [default to undefined]
|
|
29
|
-
**selfTradePreventionType** | [**SelfTradePreventionType**](SelfTradePreventionType.md) | | [default to undefined]
|
|
30
|
-
**createdAtMillis** | **number** | The timestamp of the order creation in milliseconds. | [default to undefined]
|
|
31
|
-
**updatedAtMillis** | **number** | The timestamp of the last update of the order in milliseconds. | [default to undefined]
|
|
32
|
-
**cancellationReason** | [**OrderCancelReason**](OrderCancelReason.md) | | [default to undefined]
|
|
33
|
-
**failureToCancelReason** | [**OrderCancellationFailureReason**](OrderCancellationFailureReason.md) | | [optional] [default to undefined]
|
|
34
|
-
**remainingQuantityE9** | **string** | The remaining quantity of the order. | [default to undefined]
|
|
35
|
-
|
|
36
|
-
## Example
|
|
37
|
-
|
|
38
|
-
```typescript
|
|
39
|
-
import { AccountOrderUpdate } from '@bluefin/api-client';
|
|
40
|
-
|
|
41
|
-
const instance: AccountOrderUpdate = {
|
|
42
|
-
orderHash,
|
|
43
|
-
clientOrderId,
|
|
44
|
-
symbol,
|
|
45
|
-
accountAddress,
|
|
46
|
-
priceE9,
|
|
47
|
-
quantityE9,
|
|
48
|
-
filledQuantityE9,
|
|
49
|
-
side,
|
|
50
|
-
leverageE9,
|
|
51
|
-
isIsolated,
|
|
52
|
-
salt,
|
|
53
|
-
expiresAtMillis,
|
|
54
|
-
signedAtMillis,
|
|
55
|
-
signerAddress,
|
|
56
|
-
type,
|
|
57
|
-
reduceOnly,
|
|
58
|
-
postOnly,
|
|
59
|
-
timeInForce,
|
|
60
|
-
triggerPriceE9,
|
|
61
|
-
status,
|
|
62
|
-
selfTradePreventionType,
|
|
63
|
-
createdAtMillis,
|
|
64
|
-
updatedAtMillis,
|
|
65
|
-
cancellationReason,
|
|
66
|
-
failureToCancelReason,
|
|
67
|
-
remainingQuantityE9,
|
|
68
|
-
};
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# AccountPositionLeverageUpdateRequest
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
## Properties
|
|
5
|
-
|
|
6
|
-
Name | Type | Description | Notes
|
|
7
|
-
------------ | ------------- | ------------- | -------------
|
|
8
|
-
**signedFields** | [**AccountPositionLeverageUpdateRequestSignedFields**](AccountPositionLeverageUpdateRequestSignedFields.md) | | [default to undefined]
|
|
9
|
-
**signature** | **string** | The signature of the request, encoded from the signedFields | [default to undefined]
|
|
10
|
-
|
|
11
|
-
## Example
|
|
12
|
-
|
|
13
|
-
```typescript
|
|
14
|
-
import { AccountPositionLeverageUpdateRequest } from '@bluefin/api-client';
|
|
15
|
-
|
|
16
|
-
const instance: AccountPositionLeverageUpdateRequest = {
|
|
17
|
-
signedFields,
|
|
18
|
-
signature,
|
|
19
|
-
};
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# AccountPositionLeverageUpdateRequestSignedFields
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
## Properties
|
|
5
|
-
|
|
6
|
-
Name | Type | Description | Notes
|
|
7
|
-
------------ | ------------- | ------------- | -------------
|
|
8
|
-
**accountAddress** | **string** | The Account Address from which to update leverage | [default to undefined]
|
|
9
|
-
**symbol** | **string** | Symbol of the perpetual of the positions for which to update the leverage | [default to undefined]
|
|
10
|
-
**leverageE9** | **string** | The leverage to set for the account positions (Must be a number in base e9) | [default to undefined]
|
|
11
|
-
**salt** | **string** | The random generated SALT. Should always be a number | [default to undefined]
|
|
12
|
-
**idsId** | **string** | the ID of the internal datastore for the target network | [default to undefined]
|
|
13
|
-
**signedAtMillis** | **number** | The timestamp in millis at which the request was signed | [default to undefined]
|
|
14
|
-
|
|
15
|
-
## Example
|
|
16
|
-
|
|
17
|
-
```typescript
|
|
18
|
-
import { AccountPositionLeverageUpdateRequestSignedFields } from '@bluefin/api-client';
|
|
19
|
-
|
|
20
|
-
const instance: AccountPositionLeverageUpdateRequestSignedFields = {
|
|
21
|
-
accountAddress,
|
|
22
|
-
symbol,
|
|
23
|
-
leverageE9,
|
|
24
|
-
salt,
|
|
25
|
-
idsId,
|
|
26
|
-
signedAtMillis,
|
|
27
|
-
};
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|