coinbase-api 0.3.2 → 1.0.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/README.md +438 -14
- package/dist/cjs/CBAdvancedTradeClient.d.ts +559 -0
- package/dist/cjs/CBAdvancedTradeClient.js +574 -0
- package/dist/cjs/CBAdvancedTradeClient.js.map +1 -0
- package/dist/cjs/CBAppClient.d.ts +359 -0
- package/dist/cjs/CBAppClient.js +336 -0
- package/dist/cjs/CBAppClient.js.map +1 -0
- package/dist/cjs/CBCommerceClient.d.ts +110 -0
- package/dist/cjs/CBCommerceClient.js +105 -0
- package/dist/cjs/CBCommerceClient.js.map +1 -0
- package/dist/cjs/CBExchangeClient.d.ts +640 -0
- package/dist/cjs/CBExchangeClient.js +751 -0
- package/dist/cjs/CBExchangeClient.js.map +1 -0
- package/dist/cjs/CBInternationalClient.d.ts +381 -0
- package/dist/cjs/CBInternationalClient.js +437 -0
- package/dist/cjs/CBInternationalClient.js.map +1 -0
- package/dist/cjs/CBPrimeClient.d.ts +363 -0
- package/dist/cjs/CBPrimeClient.js +451 -0
- package/dist/cjs/CBPrimeClient.js.map +1 -0
- package/dist/cjs/WebsocketClient.d.ts +78 -0
- package/dist/cjs/WebsocketClient.js +534 -0
- package/dist/cjs/WebsocketClient.js.map +1 -0
- package/dist/cjs/index.d.ts +13 -0
- package/dist/cjs/index.js +30 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/lib/BaseRestClient.d.ts +66 -0
- package/dist/cjs/lib/BaseRestClient.js +436 -0
- package/dist/cjs/lib/BaseRestClient.js.map +1 -0
- package/dist/cjs/lib/BaseWSClient.d.ts +169 -0
- package/dist/cjs/lib/BaseWSClient.js +638 -0
- package/dist/cjs/lib/BaseWSClient.js.map +1 -0
- package/dist/cjs/lib/jwtNode.d.ts +13 -0
- package/dist/cjs/lib/jwtNode.js +52 -0
- package/dist/cjs/lib/jwtNode.js.map +1 -0
- package/dist/cjs/lib/misc-util.d.ts +1 -0
- package/dist/cjs/lib/misc-util.js +7 -0
- package/dist/cjs/lib/misc-util.js.map +1 -0
- package/dist/cjs/lib/requestUtils.d.ts +98 -0
- package/dist/cjs/lib/requestUtils.js +75 -0
- package/dist/cjs/lib/requestUtils.js.map +1 -0
- package/dist/cjs/lib/webCryptoAPI.d.ts +10 -0
- package/dist/cjs/lib/webCryptoAPI.js +83 -0
- package/dist/cjs/lib/webCryptoAPI.js.map +1 -0
- package/dist/cjs/lib/websocket/WsStore.d.ts +63 -0
- package/dist/cjs/lib/websocket/WsStore.js +254 -0
- package/dist/cjs/lib/websocket/WsStore.js.map +1 -0
- package/dist/cjs/lib/websocket/WsStore.types.d.ts +49 -0
- package/dist/cjs/lib/websocket/WsStore.types.js +14 -0
- package/dist/cjs/lib/websocket/WsStore.types.js.map +1 -0
- package/dist/cjs/lib/websocket/logger.d.ts +6 -0
- package/dist/cjs/lib/websocket/logger.js +16 -0
- package/dist/cjs/lib/websocket/logger.js.map +1 -0
- package/dist/cjs/lib/websocket/typeGuards.d.ts +27 -0
- package/dist/cjs/lib/websocket/typeGuards.js +86 -0
- package/dist/cjs/lib/websocket/typeGuards.js.map +1 -0
- package/dist/cjs/lib/websocket/websocket-util.d.ts +120 -0
- package/dist/cjs/lib/websocket/websocket-util.js +173 -0
- package/dist/cjs/lib/websocket/websocket-util.js.map +1 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/types/request/advanced-trade-client.d.ts +194 -0
- package/dist/cjs/types/request/advanced-trade-client.js +18 -0
- package/dist/cjs/types/request/advanced-trade-client.js.map +1 -0
- package/dist/cjs/types/request/coinbase-app-client.d.ts +80 -0
- package/dist/cjs/types/request/coinbase-app-client.js +28 -0
- package/dist/cjs/types/request/coinbase-app-client.js.map +1 -0
- package/dist/cjs/types/request/coinbase-exchange.d.ts +332 -0
- package/dist/cjs/types/request/coinbase-exchange.js +3 -0
- package/dist/cjs/types/request/coinbase-exchange.js.map +1 -0
- package/dist/cjs/types/request/coinbase-international.d.ts +160 -0
- package/dist/cjs/types/request/coinbase-international.js +13 -0
- package/dist/cjs/types/request/coinbase-international.js.map +1 -0
- package/dist/cjs/types/request/coinbase-prime.d.ts +298 -0
- package/dist/cjs/types/request/coinbase-prime.js +8 -0
- package/dist/cjs/types/request/coinbase-prime.js.map +1 -0
- package/dist/cjs/types/response/advanced-trade-client.d.ts +759 -0
- package/dist/cjs/types/response/advanced-trade-client.js +8 -0
- package/dist/cjs/types/response/advanced-trade-client.js.map +1 -0
- package/dist/cjs/types/response/coinbase-app-client.d.ts +168 -0
- package/dist/cjs/types/response/coinbase-app-client.js +18 -0
- package/dist/cjs/types/response/coinbase-app-client.js.map +1 -0
- package/dist/cjs/types/response/coinbase-exchange.d.ts +80 -0
- package/dist/cjs/types/response/coinbase-exchange.js +82 -0
- package/dist/cjs/types/response/coinbase-exchange.js.map +1 -0
- package/dist/cjs/types/response/coinbase-international.d.ts +40 -0
- package/dist/cjs/types/response/coinbase-international.js +42 -0
- package/dist/cjs/types/response/coinbase-international.js.map +1 -0
- package/dist/cjs/types/response/coinbase-prime.d.ts +70 -0
- package/dist/cjs/types/response/coinbase-prime.js +72 -0
- package/dist/cjs/types/response/coinbase-prime.js.map +1 -0
- package/dist/cjs/types/response/ws.d.ts +7 -0
- package/dist/cjs/types/response/ws.js +3 -0
- package/dist/cjs/types/response/ws.js.map +1 -0
- package/dist/cjs/types/shared.types.d.ts +60 -0
- package/dist/cjs/types/shared.types.js +3 -0
- package/dist/cjs/types/shared.types.js.map +1 -0
- package/dist/cjs/types/websockets/client.d.ts +73 -0
- package/dist/cjs/types/websockets/client.js +3 -0
- package/dist/cjs/types/websockets/client.js.map +1 -0
- package/dist/cjs/types/websockets/events.d.ts +40 -0
- package/dist/cjs/types/websockets/events.js +3 -0
- package/dist/cjs/types/websockets/events.js.map +1 -0
- package/dist/cjs/types/websockets/requests.d.ts +76 -0
- package/dist/cjs/types/websockets/requests.js +3 -0
- package/dist/cjs/types/websockets/requests.js.map +1 -0
- package/dist/cjs/types/websockets/wsAPI.d.ts +9 -0
- package/dist/cjs/types/websockets/wsAPI.js +3 -0
- package/dist/cjs/types/websockets/wsAPI.js.map +1 -0
- package/dist/mjs/CBAdvancedTradeClient.d.ts +559 -0
- package/dist/mjs/CBAdvancedTradeClient.js +570 -0
- package/dist/mjs/CBAdvancedTradeClient.js.map +1 -0
- package/dist/mjs/CBAppClient.d.ts +359 -0
- package/dist/mjs/CBAppClient.js +332 -0
- package/dist/mjs/CBAppClient.js.map +1 -0
- package/dist/mjs/CBCommerceClient.d.ts +110 -0
- package/dist/mjs/CBCommerceClient.js +101 -0
- package/dist/mjs/CBCommerceClient.js.map +1 -0
- package/dist/mjs/CBExchangeClient.d.ts +640 -0
- package/dist/mjs/CBExchangeClient.js +747 -0
- package/dist/mjs/CBExchangeClient.js.map +1 -0
- package/dist/mjs/CBInternationalClient.d.ts +381 -0
- package/dist/mjs/CBInternationalClient.js +433 -0
- package/dist/mjs/CBInternationalClient.js.map +1 -0
- package/dist/mjs/CBPrimeClient.d.ts +363 -0
- package/dist/mjs/CBPrimeClient.js +447 -0
- package/dist/mjs/CBPrimeClient.js.map +1 -0
- package/dist/mjs/WebsocketClient.d.ts +78 -0
- package/dist/mjs/WebsocketClient.js +530 -0
- package/dist/mjs/WebsocketClient.js.map +1 -0
- package/dist/mjs/index.d.ts +13 -0
- package/dist/mjs/index.js +14 -0
- package/dist/mjs/index.js.map +1 -0
- package/dist/mjs/lib/BaseRestClient.d.ts +66 -0
- package/dist/mjs/lib/BaseRestClient.js +429 -0
- package/dist/mjs/lib/BaseRestClient.js.map +1 -0
- package/dist/mjs/lib/BaseWSClient.d.ts +169 -0
- package/dist/mjs/lib/BaseWSClient.js +631 -0
- package/dist/mjs/lib/BaseWSClient.js.map +1 -0
- package/dist/mjs/lib/jwtNode.d.ts +13 -0
- package/dist/mjs/lib/jwtNode.js +45 -0
- package/dist/mjs/lib/jwtNode.js.map +1 -0
- package/dist/mjs/lib/misc-util.d.ts +1 -0
- package/dist/mjs/lib/misc-util.js +4 -0
- package/dist/mjs/lib/misc-util.js.map +1 -0
- package/dist/mjs/lib/requestUtils.d.ts +98 -0
- package/dist/mjs/lib/requestUtils.js +69 -0
- package/dist/mjs/lib/requestUtils.js.map +1 -0
- package/dist/mjs/lib/webCryptoAPI.d.ts +10 -0
- package/dist/mjs/lib/webCryptoAPI.js +79 -0
- package/dist/mjs/lib/webCryptoAPI.js.map +1 -0
- package/dist/mjs/lib/websocket/WsStore.d.ts +63 -0
- package/dist/mjs/lib/websocket/WsStore.js +249 -0
- package/dist/mjs/lib/websocket/WsStore.js.map +1 -0
- package/dist/mjs/lib/websocket/WsStore.types.d.ts +49 -0
- package/dist/mjs/lib/websocket/WsStore.types.js +11 -0
- package/dist/mjs/lib/websocket/WsStore.types.js.map +1 -0
- package/dist/mjs/lib/websocket/logger.d.ts +6 -0
- package/dist/mjs/lib/websocket/logger.js +13 -0
- package/dist/mjs/lib/websocket/logger.js.map +1 -0
- package/dist/mjs/lib/websocket/typeGuards.d.ts +27 -0
- package/dist/mjs/lib/websocket/typeGuards.js +78 -0
- package/dist/mjs/lib/websocket/typeGuards.js.map +1 -0
- package/dist/mjs/lib/websocket/websocket-util.d.ts +120 -0
- package/dist/mjs/lib/websocket/websocket-util.js +164 -0
- package/dist/mjs/lib/websocket/websocket-util.js.map +1 -0
- package/dist/mjs/package.json +3 -0
- package/dist/mjs/types/request/advanced-trade-client.d.ts +194 -0
- package/dist/mjs/types/request/advanced-trade-client.js +17 -0
- package/dist/mjs/types/request/advanced-trade-client.js.map +1 -0
- package/dist/mjs/types/request/coinbase-app-client.d.ts +80 -0
- package/dist/mjs/types/request/coinbase-app-client.js +27 -0
- package/dist/mjs/types/request/coinbase-app-client.js.map +1 -0
- package/dist/mjs/types/request/coinbase-exchange.d.ts +332 -0
- package/dist/mjs/types/request/coinbase-exchange.js +2 -0
- package/dist/mjs/types/request/coinbase-exchange.js.map +1 -0
- package/dist/mjs/types/request/coinbase-international.d.ts +160 -0
- package/dist/mjs/types/request/coinbase-international.js +12 -0
- package/dist/mjs/types/request/coinbase-international.js.map +1 -0
- package/dist/mjs/types/request/coinbase-prime.d.ts +298 -0
- package/dist/mjs/types/request/coinbase-prime.js +7 -0
- package/dist/mjs/types/request/coinbase-prime.js.map +1 -0
- package/dist/mjs/types/response/advanced-trade-client.d.ts +759 -0
- package/dist/mjs/types/response/advanced-trade-client.js +7 -0
- package/dist/mjs/types/response/advanced-trade-client.js.map +1 -0
- package/dist/mjs/types/response/coinbase-app-client.d.ts +168 -0
- package/dist/mjs/types/response/coinbase-app-client.js +17 -0
- package/dist/mjs/types/response/coinbase-app-client.js.map +1 -0
- package/dist/mjs/types/response/coinbase-exchange.d.ts +80 -0
- package/dist/mjs/types/response/coinbase-exchange.js +82 -0
- package/dist/mjs/types/response/coinbase-exchange.js.map +1 -0
- package/dist/mjs/types/response/coinbase-international.d.ts +40 -0
- package/dist/mjs/types/response/coinbase-international.js +42 -0
- package/dist/mjs/types/response/coinbase-international.js.map +1 -0
- package/dist/mjs/types/response/coinbase-prime.d.ts +70 -0
- package/dist/mjs/types/response/coinbase-prime.js +72 -0
- package/dist/mjs/types/response/coinbase-prime.js.map +1 -0
- package/dist/mjs/types/response/ws.d.ts +7 -0
- package/dist/mjs/types/response/ws.js +2 -0
- package/dist/mjs/types/response/ws.js.map +1 -0
- package/dist/mjs/types/shared.types.d.ts +60 -0
- package/dist/mjs/types/shared.types.js +2 -0
- package/dist/mjs/types/shared.types.js.map +1 -0
- package/dist/mjs/types/websockets/client.d.ts +73 -0
- package/dist/mjs/types/websockets/client.js +2 -0
- package/dist/mjs/types/websockets/client.js.map +1 -0
- package/dist/mjs/types/websockets/events.d.ts +40 -0
- package/dist/mjs/types/websockets/events.js +2 -0
- package/dist/mjs/types/websockets/events.js.map +1 -0
- package/dist/mjs/types/websockets/requests.d.ts +76 -0
- package/dist/mjs/types/websockets/requests.js +2 -0
- package/dist/mjs/types/websockets/requests.js.map +1 -0
- package/dist/mjs/types/websockets/wsAPI.d.ts +9 -0
- package/dist/mjs/types/websockets/wsAPI.js +2 -0
- package/dist/mjs/types/websockets/wsAPI.js.map +1 -0
- package/package.json +42 -30
- package/index.js +0 -1
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -16
- package/lib/index.js.map +0 -1
|
@@ -0,0 +1,640 @@
|
|
|
1
|
+
import { AxiosRequestConfig } from 'axios';
|
|
2
|
+
import { BaseRestClient } from './lib/BaseRestClient.js';
|
|
3
|
+
import { RestClientOptions, RestClientType } from './lib/requestUtils.js';
|
|
4
|
+
import { CancelCBExchOrderRequest, CBExchDepositFromCoinbaseAccount, CBExchDepositFromPaymentMethod, CBExchGetCryptoWithdrawalFeeEstimate, CBExchGetTransfersRequest, CBExchWithdrawToCBAccount, CBExchWithdrawToCryptoAddress, CBExchWithdrawToPaymentMethod, ConvertCBExchCurrencyRequest, CreateCBExchNewCryptoAddress, CreateCBExchReport, GetAllCBExchReports, GetCBExchAccountHoldsRequest, GetCBExchAccountLedgerRequest, GetCBExchAccountTransfersRequest, GetCBExchAddressBookRequest, GetCBExchAllStakeWraps, GetCBExchFillsRequest, GetCBExchOrdersRequest, GetCBExchPrincipalRepaymentPreview, GetCBExchProductCandles, GetCBExchProductTrades, GetCBExchTravelRuleInformation, RepayCBExchLoanInterest, RepayCBExchLoanPrincipal, SubmitCBExchNewLoan, SubmitCBExchOrderRequest, SubmitCBExchTravelInformation, TransferCBExchFundsBetweenProfiles } from './types/request/coinbase-exchange.js';
|
|
5
|
+
/**
|
|
6
|
+
* REST client for Coinbase's Institutional Exchange API:
|
|
7
|
+
* https://docs.cdp.coinbase.com/exchange/docs/welcome
|
|
8
|
+
*/
|
|
9
|
+
export declare class CBExchangeClient extends BaseRestClient {
|
|
10
|
+
constructor(restClientOptions?: RestClientOptions, requestOptions?: AxiosRequestConfig);
|
|
11
|
+
getClientType(): RestClientType;
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* Accounts Endpoints
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* Get all accounts for a profile
|
|
19
|
+
*
|
|
20
|
+
* Get a list of trading accounts from the profile of the API key.
|
|
21
|
+
* Your trading accounts are separate from your Coinbase accounts. See Deposit from Coinbase account for documentation on how to deposit funds to begin trading.
|
|
22
|
+
*/
|
|
23
|
+
getAccounts(): Promise<any>;
|
|
24
|
+
/**
|
|
25
|
+
* Get a single account by id
|
|
26
|
+
*
|
|
27
|
+
* Information for a single account. Use this endpoint when you know the account_id. API key must belong to the same profile as the account.
|
|
28
|
+
*/
|
|
29
|
+
getAccount(params: {
|
|
30
|
+
account_id: string;
|
|
31
|
+
}): Promise<any>;
|
|
32
|
+
/**
|
|
33
|
+
* Get a single account's holds
|
|
34
|
+
*
|
|
35
|
+
* List the holds of an account that belong to the same profile as the API key. Holds are placed on an account for any active orders or
|
|
36
|
+
* pending withdraw requests. As an order is filled, the hold amount is updated.
|
|
37
|
+
* If an order is canceled, any remaining hold is removed. For withdrawals, the hold is removed after it is completed.
|
|
38
|
+
*/
|
|
39
|
+
getAccountHolds(params: GetCBExchAccountHoldsRequest): Promise<any>;
|
|
40
|
+
/**
|
|
41
|
+
* Get a single account's ledger
|
|
42
|
+
*
|
|
43
|
+
* Lists ledger activity for an account. This includes anything that would affect the account's balance - transfers, trades, fees, etc.
|
|
44
|
+
* If neither start_date nor end_date is set, the endpoint will return ledger activity for the past 1 day only.
|
|
45
|
+
* List account activity of the API key's profile. Account activity either increases or decreases your account balance.
|
|
46
|
+
*
|
|
47
|
+
* Entry Types:
|
|
48
|
+
* - transfer: Funds moved to/from Coinbase to Coinbase Exchange
|
|
49
|
+
* - match: Funds moved as a result of a trade
|
|
50
|
+
* - fee: Fee as a result of a trade
|
|
51
|
+
* - rebate: Fee rebate as per our fee schedule
|
|
52
|
+
* - conversion: Funds converted between fiat currency and a stablecoin
|
|
53
|
+
*/
|
|
54
|
+
getAccountLedger(params: GetCBExchAccountLedgerRequest): Promise<any>;
|
|
55
|
+
/**
|
|
56
|
+
* Get a single account's transfers
|
|
57
|
+
*
|
|
58
|
+
* Lists past withdrawals and deposits for an account.
|
|
59
|
+
*/
|
|
60
|
+
getAccountTransfers(params: GetCBExchAccountTransfersRequest): Promise<any>;
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* Address book Endpoints
|
|
64
|
+
*
|
|
65
|
+
*/
|
|
66
|
+
/**
|
|
67
|
+
* Get address book
|
|
68
|
+
*
|
|
69
|
+
* Get all addresses stored in the address book.
|
|
70
|
+
*/
|
|
71
|
+
getAddressBook(): Promise<any>;
|
|
72
|
+
/**
|
|
73
|
+
* Add addresses
|
|
74
|
+
*
|
|
75
|
+
* Add new addresses to address book.
|
|
76
|
+
*/
|
|
77
|
+
addAddresses(params: GetCBExchAddressBookRequest): Promise<any>;
|
|
78
|
+
/**
|
|
79
|
+
* Delete address
|
|
80
|
+
*
|
|
81
|
+
* Delete address from address book.
|
|
82
|
+
*/
|
|
83
|
+
deleteAddress(params: {
|
|
84
|
+
id: string;
|
|
85
|
+
}): Promise<any>;
|
|
86
|
+
/**
|
|
87
|
+
*
|
|
88
|
+
* Coinbase Accounts Endpoints
|
|
89
|
+
*
|
|
90
|
+
*/
|
|
91
|
+
/**
|
|
92
|
+
* Get all Coinbase wallets
|
|
93
|
+
*
|
|
94
|
+
* Gets all the user's available Coinbase wallets. These are the wallets/accounts that are used for buying and selling on www.coinbase.com.
|
|
95
|
+
*/
|
|
96
|
+
getCoinbaseWallets(): Promise<any>;
|
|
97
|
+
/**
|
|
98
|
+
* Generate crypto address
|
|
99
|
+
*
|
|
100
|
+
* Generates a one-time crypto address for depositing crypto.
|
|
101
|
+
*/
|
|
102
|
+
createNewCryptoAddress(params: CreateCBExchNewCryptoAddress): Promise<any>;
|
|
103
|
+
/**
|
|
104
|
+
*
|
|
105
|
+
* Conversions Endpoints
|
|
106
|
+
*
|
|
107
|
+
*/
|
|
108
|
+
/**
|
|
109
|
+
* Convert currency
|
|
110
|
+
*
|
|
111
|
+
* Converts funds from one currency to another. Funds are converted on the from account in the profile_id profile.
|
|
112
|
+
*/
|
|
113
|
+
convertCurrency(params: ConvertCBExchCurrencyRequest): Promise<any>;
|
|
114
|
+
/**
|
|
115
|
+
* Get conversion fee rates
|
|
116
|
+
*
|
|
117
|
+
* Gets a list of current conversion fee rates and trailing 30 day volume by currency pair.
|
|
118
|
+
*/
|
|
119
|
+
getConversionFeeRates(): Promise<any>;
|
|
120
|
+
/**
|
|
121
|
+
* Get a conversion
|
|
122
|
+
*
|
|
123
|
+
* Gets a currency conversion by id (i.e. USD -> USDC).
|
|
124
|
+
*/
|
|
125
|
+
getConversion(params: {
|
|
126
|
+
conversion_id: string;
|
|
127
|
+
profile_id?: string;
|
|
128
|
+
}): Promise<any>;
|
|
129
|
+
/**
|
|
130
|
+
*
|
|
131
|
+
* Currencies Endpoints
|
|
132
|
+
*
|
|
133
|
+
*/
|
|
134
|
+
/**
|
|
135
|
+
* Get all known currencies
|
|
136
|
+
*
|
|
137
|
+
* Gets a list of all known currencies. Note: Not all currencies may be currently in use for trading.
|
|
138
|
+
*/
|
|
139
|
+
getCurrencies(): Promise<any>;
|
|
140
|
+
/**
|
|
141
|
+
* Get a currency
|
|
142
|
+
*
|
|
143
|
+
* Gets a single currency by id.
|
|
144
|
+
*/
|
|
145
|
+
getCurrency(currency_id: string): Promise<any>;
|
|
146
|
+
/**
|
|
147
|
+
*
|
|
148
|
+
* Transfers Endpoints
|
|
149
|
+
*
|
|
150
|
+
*/
|
|
151
|
+
/**
|
|
152
|
+
* Deposit from Coinbase account
|
|
153
|
+
*
|
|
154
|
+
* Deposits funds from a www.coinbase.com wallet to the specified profile_id.
|
|
155
|
+
*/
|
|
156
|
+
depositFromCoinbaseAccount(params: CBExchDepositFromCoinbaseAccount): Promise<any>;
|
|
157
|
+
/**
|
|
158
|
+
* Deposit from payment method
|
|
159
|
+
*
|
|
160
|
+
* Deposits funds from a linked external payment method to the specified profile_id.
|
|
161
|
+
* See Get all payment methods. The SEPA payment method is not allowed for depositing funds because it is a push payment method.
|
|
162
|
+
*/
|
|
163
|
+
depositFromPaymentMethod(params: CBExchDepositFromPaymentMethod): Promise<any>;
|
|
164
|
+
/**
|
|
165
|
+
* Get all payment methods
|
|
166
|
+
*
|
|
167
|
+
* Gets a list of the user's linked payment methods.
|
|
168
|
+
*/
|
|
169
|
+
getPaymentMethods(): Promise<any>;
|
|
170
|
+
/**
|
|
171
|
+
* Get all transfers
|
|
172
|
+
*
|
|
173
|
+
* Gets a list of in-progress and completed transfers of funds in/out of any of the user's accounts.
|
|
174
|
+
*/
|
|
175
|
+
getTransfers(params?: CBExchGetTransfersRequest): Promise<any>;
|
|
176
|
+
/**
|
|
177
|
+
* Get a single transfer
|
|
178
|
+
*
|
|
179
|
+
* Get information on a single transfer.
|
|
180
|
+
*/
|
|
181
|
+
getTransfer(params: {
|
|
182
|
+
transfer_id: string;
|
|
183
|
+
}): Promise<any>;
|
|
184
|
+
/**
|
|
185
|
+
* Submit travel information for a transfer
|
|
186
|
+
*
|
|
187
|
+
* Submit travel information for a transfer.
|
|
188
|
+
*/
|
|
189
|
+
submitTravelInformation(params: SubmitCBExchTravelInformation): Promise<any>;
|
|
190
|
+
/**
|
|
191
|
+
* Withdraw to Coinbase account
|
|
192
|
+
*
|
|
193
|
+
* Withdraws funds from the specified profile_id to a www.coinbase.com wallet.
|
|
194
|
+
* You can move funds between your Coinbase accounts and your Coinbase Exchange trading accounts within your daily limits. Moving funds between Coinbase and Coinbase Exchange is instant and free.
|
|
195
|
+
* See the Coinbase Accounts section for retrieving your Coinbase accounts.
|
|
196
|
+
*/
|
|
197
|
+
withdrawToCoinbaseAccount(params: CBExchWithdrawToCBAccount): Promise<any>;
|
|
198
|
+
/**
|
|
199
|
+
* Withdraw to crypto address
|
|
200
|
+
*
|
|
201
|
+
* Withdraws funds from the specified profile_id to an external crypto address.
|
|
202
|
+
*/
|
|
203
|
+
withdrawToCryptoAddress(params: CBExchWithdrawToCryptoAddress): Promise<any>;
|
|
204
|
+
/**
|
|
205
|
+
* Get fee estimate for crypto withdrawal
|
|
206
|
+
*
|
|
207
|
+
* Gets the fee estimate for the crypto withdrawal to a crypto address.
|
|
208
|
+
*/
|
|
209
|
+
getCryptoWithdrawalFeeEstimate(params: CBExchGetCryptoWithdrawalFeeEstimate): Promise<any>;
|
|
210
|
+
/**
|
|
211
|
+
* Withdraw to payment method
|
|
212
|
+
*
|
|
213
|
+
* Withdraws funds from the specified profile_id to a linked external payment method.
|
|
214
|
+
* See the Payment Methods section for retrieving your payment methods.
|
|
215
|
+
*/
|
|
216
|
+
withdrawToPaymentMethod(params: CBExchWithdrawToPaymentMethod): Promise<any>;
|
|
217
|
+
/**
|
|
218
|
+
*
|
|
219
|
+
* Fees Endpoints
|
|
220
|
+
*
|
|
221
|
+
*/
|
|
222
|
+
/**
|
|
223
|
+
* Get fees
|
|
224
|
+
*
|
|
225
|
+
* Get fee rates and 30 days trailing volume.
|
|
226
|
+
* This request returns your current maker & taker fee rates, as well as your 30-day trailing volume. Quoted rates are subject to change.
|
|
227
|
+
*/
|
|
228
|
+
getFees(): Promise<any>;
|
|
229
|
+
/**
|
|
230
|
+
*
|
|
231
|
+
* Orders Endpoints
|
|
232
|
+
*
|
|
233
|
+
*/
|
|
234
|
+
/**
|
|
235
|
+
* Get all fills
|
|
236
|
+
*
|
|
237
|
+
* Get a list of recent fills of the API key's profile. A fill is a partial or complete match on a specific order.
|
|
238
|
+
*/
|
|
239
|
+
getFills(params?: GetCBExchFillsRequest): Promise<any>;
|
|
240
|
+
/**
|
|
241
|
+
* Get all orders
|
|
242
|
+
*
|
|
243
|
+
* List your current open orders. Only open or un-settled orders are returned by default. As soon as an order is no longer open and settled, it will no longer appear in the default request.
|
|
244
|
+
* Open orders may change state between the request and the response depending on market conditions.
|
|
245
|
+
*/
|
|
246
|
+
getOrders(params?: GetCBExchOrdersRequest): Promise<any>;
|
|
247
|
+
/**
|
|
248
|
+
* Cancel all orders
|
|
249
|
+
*
|
|
250
|
+
* With best effort, cancel all open orders. This may require you to make the request multiple times until all of the open orders are deleted.
|
|
251
|
+
*/
|
|
252
|
+
cancelAllOrders(params?: {
|
|
253
|
+
profile_id?: string;
|
|
254
|
+
product_id?: string;
|
|
255
|
+
}): Promise<any>;
|
|
256
|
+
/**
|
|
257
|
+
* Create a new order
|
|
258
|
+
*
|
|
259
|
+
* Create an order. You can place two types of orders: limit and market. Orders can only be placed if your account has sufficient funds.
|
|
260
|
+
* Once an order is placed, your account funds will be put on hold for the duration of the order.
|
|
261
|
+
*/
|
|
262
|
+
submitOrder(params: SubmitCBExchOrderRequest): Promise<any>;
|
|
263
|
+
/**
|
|
264
|
+
* Get single order
|
|
265
|
+
*
|
|
266
|
+
* Get a single order by id.
|
|
267
|
+
*/
|
|
268
|
+
getOrder(params: {
|
|
269
|
+
order_id: string;
|
|
270
|
+
market_type?: string;
|
|
271
|
+
}): Promise<any>;
|
|
272
|
+
/**
|
|
273
|
+
* Cancel an order
|
|
274
|
+
*
|
|
275
|
+
* Cancel a single open order by id.
|
|
276
|
+
*/
|
|
277
|
+
cancelOrder(params: CancelCBExchOrderRequest): Promise<any>;
|
|
278
|
+
/**
|
|
279
|
+
*
|
|
280
|
+
* Loans Endpoints
|
|
281
|
+
*
|
|
282
|
+
*/
|
|
283
|
+
/**
|
|
284
|
+
* List loans
|
|
285
|
+
*
|
|
286
|
+
* Accepts zero or more loan IDs as input. If no loan IDs are specified, it returns all loans for the user. Otherwise, it returns only the loan IDs specified.
|
|
287
|
+
*/
|
|
288
|
+
getLoans(params?: {
|
|
289
|
+
ids?: string;
|
|
290
|
+
}): Promise<any>;
|
|
291
|
+
/**
|
|
292
|
+
* List loan assets
|
|
293
|
+
*
|
|
294
|
+
* Get a list of lendable assets, a map of assets we accept as collateral for loans, and the haircut weight.
|
|
295
|
+
*/
|
|
296
|
+
getLoanAssets(): Promise<any>;
|
|
297
|
+
/**
|
|
298
|
+
* List interest summaries
|
|
299
|
+
*
|
|
300
|
+
* List summaries of interest owed by asset.
|
|
301
|
+
*/
|
|
302
|
+
getInterestSummaries(): Promise<any>;
|
|
303
|
+
/**
|
|
304
|
+
* List interest rate history
|
|
305
|
+
*
|
|
306
|
+
* List interest rate history for a loan.
|
|
307
|
+
*/
|
|
308
|
+
getInterestRateHistory(params: {
|
|
309
|
+
loan_id: string;
|
|
310
|
+
}): Promise<any>;
|
|
311
|
+
/**
|
|
312
|
+
* List interest charges
|
|
313
|
+
*
|
|
314
|
+
* List interest charges for a loan.
|
|
315
|
+
*/
|
|
316
|
+
getInterestCharges(params: {
|
|
317
|
+
loan_id: string;
|
|
318
|
+
}): Promise<any>;
|
|
319
|
+
/**
|
|
320
|
+
* Get lending overview
|
|
321
|
+
*
|
|
322
|
+
* This API summarizes lending for a given client. It calculates the overall loan balance, collateral level, and amounts available to borrow.
|
|
323
|
+
* It also returns any withdrawal restrictions in force on the client.
|
|
324
|
+
*
|
|
325
|
+
* Get lending overview returns all amounts in USD notional values, except available_per_asset mappings which are returned in both notional and native values.
|
|
326
|
+
*/
|
|
327
|
+
getLendingOverview(): Promise<any>;
|
|
328
|
+
/**
|
|
329
|
+
* Get new loan preview
|
|
330
|
+
*
|
|
331
|
+
* This API is similar to lending-overview but is used to preview the results of opening a new loan.
|
|
332
|
+
* The values returned in the preview response take the existing loans, collateral and the potential change being previewed into account.
|
|
333
|
+
* Note the preview request accepts native currency amounts as input.
|
|
334
|
+
*/
|
|
335
|
+
getNewLoanPreview(params: {
|
|
336
|
+
currency: string;
|
|
337
|
+
native_amount: string;
|
|
338
|
+
}): Promise<any>;
|
|
339
|
+
/**
|
|
340
|
+
* Open new loan
|
|
341
|
+
*
|
|
342
|
+
* This API triggers a loan open request. Funding is not necessarily instantaneous and there is no SLA.
|
|
343
|
+
* You are notified when funds have settled in your Exchange account. Loan open requests, once initiated, cannot be canceled.
|
|
344
|
+
*/
|
|
345
|
+
submitNewLoan(params: SubmitCBExchNewLoan): Promise<any>;
|
|
346
|
+
/**
|
|
347
|
+
* List new loan options
|
|
348
|
+
*
|
|
349
|
+
* Get available currencies and interest rates for new loans. All amounts returned by this API are notional values (i.e., USD).
|
|
350
|
+
*/
|
|
351
|
+
getNewLoanOptions(): Promise<any>;
|
|
352
|
+
/**
|
|
353
|
+
* Repay loan interest
|
|
354
|
+
*
|
|
355
|
+
* Submit an interest repayment for a loan.
|
|
356
|
+
*/
|
|
357
|
+
repayLoanInterest(params: RepayCBExchLoanInterest): Promise<any>;
|
|
358
|
+
/**
|
|
359
|
+
* Repay loan principal
|
|
360
|
+
*
|
|
361
|
+
* Submit a principal repayment for a loan.
|
|
362
|
+
*/
|
|
363
|
+
repayLoanPrincipal(params: RepayCBExchLoanPrincipal): Promise<any>;
|
|
364
|
+
/**
|
|
365
|
+
* Get principal repayment preview
|
|
366
|
+
*
|
|
367
|
+
* Preview the results of a loan principal repayment.
|
|
368
|
+
* Like the Get lending overview API, all values are notional except available_per_asset which returns both notional and native values per currency.
|
|
369
|
+
*/
|
|
370
|
+
getPrincipalRepaymentPreview(params: GetCBExchPrincipalRepaymentPreview): Promise<any>;
|
|
371
|
+
/**
|
|
372
|
+
*
|
|
373
|
+
* Coinbase Price Oracle Endpoints
|
|
374
|
+
*
|
|
375
|
+
*/
|
|
376
|
+
/**
|
|
377
|
+
* Get signed prices
|
|
378
|
+
*
|
|
379
|
+
* Get cryptographically signed prices ready to be posted on-chain using Compound's Open Oracle smart contract.
|
|
380
|
+
*/
|
|
381
|
+
getSignedPrices(): Promise<any>;
|
|
382
|
+
/**
|
|
383
|
+
*
|
|
384
|
+
* Products Endpoints
|
|
385
|
+
*
|
|
386
|
+
*/
|
|
387
|
+
/**
|
|
388
|
+
* Get all known trading pairs
|
|
389
|
+
*
|
|
390
|
+
* Gets a list of available currency pairs for trading.
|
|
391
|
+
*/
|
|
392
|
+
getAllTradingPairs(params?: {
|
|
393
|
+
type?: string;
|
|
394
|
+
}): Promise<any>;
|
|
395
|
+
/**
|
|
396
|
+
* Get all product volume
|
|
397
|
+
*
|
|
398
|
+
* Gets 30-day and 24-hour volume for all products and market types.
|
|
399
|
+
*/
|
|
400
|
+
getAllProductVolume(): Promise<any>;
|
|
401
|
+
/**
|
|
402
|
+
* Get single product
|
|
403
|
+
*
|
|
404
|
+
* Get information on a single product.
|
|
405
|
+
*/
|
|
406
|
+
getProduct(params: {
|
|
407
|
+
product_id: string;
|
|
408
|
+
}): Promise<any>;
|
|
409
|
+
/**
|
|
410
|
+
* Get product book
|
|
411
|
+
*
|
|
412
|
+
* Get a list of open orders for a product. The amount of detail shown can be customized with the level parameter.
|
|
413
|
+
* By default, only the inside (i.e., the best) bid and ask are returned. This is equivalent to a book depth of 1 level.
|
|
414
|
+
* To see a larger order book, specify the level query parameter.
|
|
415
|
+
*/
|
|
416
|
+
getProductBook(params: {
|
|
417
|
+
product_id: string;
|
|
418
|
+
level?: number;
|
|
419
|
+
}): Promise<any>;
|
|
420
|
+
/**
|
|
421
|
+
* Get product candles
|
|
422
|
+
*
|
|
423
|
+
* Historic rates for a product. Rates are returned in grouped buckets.
|
|
424
|
+
* Candle schema is of the form [timestamp, price_low, price_high, price_open, price_close].
|
|
425
|
+
*/
|
|
426
|
+
getProductCandles(params: GetCBExchProductCandles): Promise<any>;
|
|
427
|
+
/**
|
|
428
|
+
* Get product stats
|
|
429
|
+
*
|
|
430
|
+
* Gets 30-day and 24-hour stats for a product.
|
|
431
|
+
*/
|
|
432
|
+
getProductStats(params: {
|
|
433
|
+
product_id: string;
|
|
434
|
+
}): Promise<any>;
|
|
435
|
+
/**
|
|
436
|
+
* Get product ticker
|
|
437
|
+
*
|
|
438
|
+
* Gets snapshot information about the last trade (tick), best bid/ask, and 24h volume.
|
|
439
|
+
*/
|
|
440
|
+
getProductTicker(params: {
|
|
441
|
+
product_id: string;
|
|
442
|
+
}): Promise<any>;
|
|
443
|
+
/**
|
|
444
|
+
* Get product trades
|
|
445
|
+
*
|
|
446
|
+
* Gets a list of the latest trades for a product.
|
|
447
|
+
*/
|
|
448
|
+
getProductTrades(params: GetCBExchProductTrades): Promise<any>;
|
|
449
|
+
/**
|
|
450
|
+
*
|
|
451
|
+
* Profiles Endpoints
|
|
452
|
+
*
|
|
453
|
+
*/
|
|
454
|
+
/**
|
|
455
|
+
* Get profiles
|
|
456
|
+
*
|
|
457
|
+
* Gets a list of all of the current user's profiles.
|
|
458
|
+
*/
|
|
459
|
+
getProfiles(params?: {
|
|
460
|
+
active?: boolean;
|
|
461
|
+
}): Promise<any>;
|
|
462
|
+
/**
|
|
463
|
+
* Create a profile
|
|
464
|
+
*
|
|
465
|
+
* Create a new profile. Will fail if no name is provided or if user already has max number of profiles.
|
|
466
|
+
*/
|
|
467
|
+
createProfile(params: {
|
|
468
|
+
name: string;
|
|
469
|
+
}): Promise<any>;
|
|
470
|
+
/**
|
|
471
|
+
* Transfer funds between profiles
|
|
472
|
+
*
|
|
473
|
+
* Transfer an amount of currency from one profile to another.
|
|
474
|
+
*/
|
|
475
|
+
transferFundsBetweenProfiles(params: TransferCBExchFundsBetweenProfiles): Promise<any>;
|
|
476
|
+
/**
|
|
477
|
+
* Get profile by id
|
|
478
|
+
*
|
|
479
|
+
* Information for a single profile. Use this endpoint when you know the profile_id.
|
|
480
|
+
*/
|
|
481
|
+
getProfileById(params: {
|
|
482
|
+
profile_id: string;
|
|
483
|
+
active?: boolean;
|
|
484
|
+
}): Promise<any>;
|
|
485
|
+
/**
|
|
486
|
+
* Rename a profile
|
|
487
|
+
*
|
|
488
|
+
* Rename a profile. Names 'default' and 'margin' are reserved.
|
|
489
|
+
*/
|
|
490
|
+
renameProfile(params: {
|
|
491
|
+
profile_id: string;
|
|
492
|
+
name: string;
|
|
493
|
+
}): Promise<any>;
|
|
494
|
+
/**
|
|
495
|
+
* Delete a profile
|
|
496
|
+
*
|
|
497
|
+
* Deletes the profile specified by profile_id and transfers all funds to the profile specified by to.
|
|
498
|
+
* Fails if there are any open orders on the profile to be deleted.
|
|
499
|
+
*/
|
|
500
|
+
deleteProfile(params: {
|
|
501
|
+
profile_id: string;
|
|
502
|
+
to: string;
|
|
503
|
+
}): Promise<any>;
|
|
504
|
+
/**
|
|
505
|
+
*
|
|
506
|
+
* Reports Endpoints
|
|
507
|
+
*
|
|
508
|
+
*/
|
|
509
|
+
/**
|
|
510
|
+
* Get all reports
|
|
511
|
+
*
|
|
512
|
+
* Gets a list of all user-generated reports.
|
|
513
|
+
*/
|
|
514
|
+
getAllReports(params?: GetAllCBExchReports): Promise<any>;
|
|
515
|
+
/**
|
|
516
|
+
* Create a report
|
|
517
|
+
*
|
|
518
|
+
* Generates a report. You can create reports with historical data for all report types.
|
|
519
|
+
* Balance reports can be snapshots of historical or current data.
|
|
520
|
+
*/
|
|
521
|
+
createReport(params: CreateCBExchReport): Promise<any>;
|
|
522
|
+
/**
|
|
523
|
+
* Get a report
|
|
524
|
+
*
|
|
525
|
+
* Get a specific report by report_id.
|
|
526
|
+
*/
|
|
527
|
+
getReport(params: {
|
|
528
|
+
report_id: string;
|
|
529
|
+
}): Promise<any>;
|
|
530
|
+
/**
|
|
531
|
+
*
|
|
532
|
+
* Travel Rule Endpoints
|
|
533
|
+
*
|
|
534
|
+
*/
|
|
535
|
+
/**
|
|
536
|
+
* Get all travel rule information
|
|
537
|
+
*
|
|
538
|
+
* Return a list of all stored travel rule information.
|
|
539
|
+
*/
|
|
540
|
+
getTravelRuleInformation(params?: GetCBExchTravelRuleInformation): Promise<any>;
|
|
541
|
+
/**
|
|
542
|
+
* Create travel rule entry
|
|
543
|
+
*
|
|
544
|
+
* Create travel rule entry for sending address.
|
|
545
|
+
*/
|
|
546
|
+
createTravelRuleEntry(params: {
|
|
547
|
+
address: string;
|
|
548
|
+
originator_name: string;
|
|
549
|
+
originator_country: string;
|
|
550
|
+
}): Promise<any>;
|
|
551
|
+
/**
|
|
552
|
+
* Delete existing travel rule entry
|
|
553
|
+
*
|
|
554
|
+
* Delete existing travel rule entry.
|
|
555
|
+
*/
|
|
556
|
+
deleteTravelRuleEntry(params: {
|
|
557
|
+
id: string;
|
|
558
|
+
}): Promise<any>;
|
|
559
|
+
/**
|
|
560
|
+
*
|
|
561
|
+
* Users Endpoints
|
|
562
|
+
*
|
|
563
|
+
*/
|
|
564
|
+
/**
|
|
565
|
+
* Get user exchange limits
|
|
566
|
+
*
|
|
567
|
+
* Gets exchange limits information for a single user.
|
|
568
|
+
*/
|
|
569
|
+
getUserExchangeLimits(params: {
|
|
570
|
+
user_id: string;
|
|
571
|
+
}): Promise<any>;
|
|
572
|
+
/**
|
|
573
|
+
* Update settlement preference
|
|
574
|
+
*
|
|
575
|
+
* Updates the settlement preference to hold funds in either USDC or USD.
|
|
576
|
+
*/
|
|
577
|
+
updateSettlementPreference(params: {
|
|
578
|
+
user_id: string;
|
|
579
|
+
settlement_preference: string;
|
|
580
|
+
}): Promise<any>;
|
|
581
|
+
/**
|
|
582
|
+
* Get user trading volume
|
|
583
|
+
*
|
|
584
|
+
* Gets aggregated and individual trading volumes for users.
|
|
585
|
+
*/
|
|
586
|
+
getUserTradingVolume(params: {
|
|
587
|
+
user_id: string;
|
|
588
|
+
}): Promise<any>;
|
|
589
|
+
/**
|
|
590
|
+
*
|
|
591
|
+
* Wrapped Assets Endpoints
|
|
592
|
+
*
|
|
593
|
+
*/
|
|
594
|
+
/**
|
|
595
|
+
* Get all wrapped assets
|
|
596
|
+
*
|
|
597
|
+
* Returns a list of all supported wrapped assets details objects.
|
|
598
|
+
*/
|
|
599
|
+
getAllWrappedAssets(): Promise<any>;
|
|
600
|
+
/**
|
|
601
|
+
* Get all stake-wraps
|
|
602
|
+
*
|
|
603
|
+
* Get details for all stake-wraps in the profile associated with the API key.
|
|
604
|
+
*/
|
|
605
|
+
getAllStakeWraps(params?: GetCBExchAllStakeWraps): Promise<any>;
|
|
606
|
+
/**
|
|
607
|
+
* Create a new stake-wrap
|
|
608
|
+
*
|
|
609
|
+
* Stakes and wraps from_currency to to_currency. Funds are stake-wrapped in the profile associated with the API key.
|
|
610
|
+
*/
|
|
611
|
+
createStakeWrap(params: {
|
|
612
|
+
from_currency: string;
|
|
613
|
+
to_currency: string;
|
|
614
|
+
amount: string;
|
|
615
|
+
}): Promise<any>;
|
|
616
|
+
/**
|
|
617
|
+
* Get a single stake-wrap
|
|
618
|
+
*
|
|
619
|
+
* Get details for a specific stake-wrap in the profile associated with the API key.
|
|
620
|
+
*/
|
|
621
|
+
getStakeWrap(params: {
|
|
622
|
+
stake_wrap_id: string;
|
|
623
|
+
}): Promise<any>;
|
|
624
|
+
/**
|
|
625
|
+
* Get wrapped asset details
|
|
626
|
+
*
|
|
627
|
+
* Returns the circulating and total supply of a wrapped asset, and its conversion rate.
|
|
628
|
+
*/
|
|
629
|
+
getWrappedAssetDetails(params: {
|
|
630
|
+
wrapped_asset_id: string;
|
|
631
|
+
}): Promise<any>;
|
|
632
|
+
/**
|
|
633
|
+
* Get wrapped asset conversion rate
|
|
634
|
+
*
|
|
635
|
+
* Returns the conversion rate of a wrapped asset.
|
|
636
|
+
*/
|
|
637
|
+
getWrappedAssetConversionRate(params: {
|
|
638
|
+
wrapped_asset_id: string;
|
|
639
|
+
}): Promise<any>;
|
|
640
|
+
}
|