coinbase-api 1.0.13 → 1.0.15-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/CBAdvancedTradeClient.js +1 -1
- package/dist/cjs/CBAdvancedTradeClient.js.map +1 -1
- package/dist/cjs/CBAppClient.d.ts +13 -8
- package/dist/cjs/CBAppClient.js +13 -41
- package/dist/cjs/CBAppClient.js.map +1 -1
- package/dist/cjs/CBInternationalClient.d.ts +0 -45
- package/dist/cjs/CBInternationalClient.js +0 -45
- package/dist/cjs/CBInternationalClient.js.map +1 -1
- package/dist/cjs/CBPrimeClient.d.ts +21 -128
- package/dist/cjs/CBPrimeClient.js +23 -160
- package/dist/cjs/CBPrimeClient.js.map +1 -1
- package/dist/cjs/lib/BaseRestClient.js +3 -5
- package/dist/cjs/lib/BaseRestClient.js.map +1 -1
- package/dist/cjs/lib/BaseWSClient.js +2 -2
- package/dist/cjs/lib/BaseWSClient.js.map +1 -1
- package/dist/cjs/lib/jwtNode.js +44 -0
- package/dist/cjs/lib/jwtNode.js.map +1 -1
- package/dist/cjs/lib/requestUtils.d.ts +1 -11
- package/dist/cjs/lib/requestUtils.js +9 -57
- package/dist/cjs/lib/requestUtils.js.map +1 -1
- package/dist/cjs/lib/websocket/websocket-util.d.ts +0 -6
- package/dist/cjs/lib/websocket/websocket-util.js +0 -19
- package/dist/cjs/lib/websocket/websocket-util.js.map +1 -1
- package/dist/cjs/types/request/advanced-trade-client.d.ts +0 -1
- package/dist/cjs/types/request/advanced-trade-client.js.map +1 -1
- package/dist/cjs/types/request/coinbase-app-client.d.ts +2 -19
- package/dist/cjs/types/request/coinbase-app-client.js.map +1 -1
- package/dist/cjs/types/request/coinbase-prime.d.ts +0 -66
- package/dist/cjs/types/response/coinbase-app-client.d.ts +2 -89
- package/dist/cjs/types/response/coinbase-app-client.js.map +1 -1
- package/dist/cjs/types/shared.types.d.ts +0 -8
- package/dist/mjs/CBAdvancedTradeClient.js +1 -1
- package/dist/mjs/CBAdvancedTradeClient.js.map +1 -1
- package/dist/mjs/CBAppClient.d.ts +13 -8
- package/dist/mjs/CBAppClient.js +14 -42
- package/dist/mjs/CBAppClient.js.map +1 -1
- package/dist/mjs/CBInternationalClient.d.ts +0 -45
- package/dist/mjs/CBInternationalClient.js +0 -45
- package/dist/mjs/CBInternationalClient.js.map +1 -1
- package/dist/mjs/CBPrimeClient.d.ts +21 -128
- package/dist/mjs/CBPrimeClient.js +23 -160
- package/dist/mjs/CBPrimeClient.js.map +1 -1
- package/dist/mjs/lib/BaseRestClient.js +3 -5
- package/dist/mjs/lib/BaseRestClient.js.map +1 -1
- package/dist/mjs/lib/BaseWSClient.js +3 -3
- package/dist/mjs/lib/BaseWSClient.js.map +1 -1
- package/dist/mjs/lib/jwtNode.js +44 -0
- package/dist/mjs/lib/jwtNode.js.map +1 -1
- package/dist/mjs/lib/requestUtils.d.ts +1 -11
- package/dist/mjs/lib/requestUtils.js +9 -56
- package/dist/mjs/lib/requestUtils.js.map +1 -1
- package/dist/mjs/lib/websocket/websocket-util.d.ts +0 -6
- package/dist/mjs/lib/websocket/websocket-util.js +0 -18
- package/dist/mjs/lib/websocket/websocket-util.js.map +1 -1
- package/dist/mjs/types/request/advanced-trade-client.d.ts +0 -1
- package/dist/mjs/types/request/advanced-trade-client.js.map +1 -1
- package/dist/mjs/types/request/coinbase-app-client.d.ts +2 -19
- package/dist/mjs/types/request/coinbase-app-client.js.map +1 -1
- package/dist/mjs/types/request/coinbase-prime.d.ts +0 -66
- package/dist/mjs/types/response/coinbase-app-client.d.ts +2 -89
- package/dist/mjs/types/response/coinbase-app-client.js.map +1 -1
- package/dist/mjs/types/shared.types.d.ts +0 -8
- package/package.json +7 -5
|
@@ -67,36 +67,18 @@ interface TransactionNetwork {
|
|
|
67
67
|
status: string;
|
|
68
68
|
name: string;
|
|
69
69
|
hash?: string;
|
|
70
|
-
transaction_fee?: TransactionAmount;
|
|
71
|
-
transaction_amount?: TransactionAmount;
|
|
72
|
-
network_name?: string;
|
|
73
|
-
status_description?: string | null;
|
|
74
70
|
}
|
|
75
71
|
interface TransactionFrom {
|
|
76
72
|
id: string;
|
|
77
73
|
resource: string;
|
|
78
|
-
resource_path?: string;
|
|
79
74
|
}
|
|
80
75
|
interface TransactionTo {
|
|
81
76
|
resource: string;
|
|
82
|
-
address
|
|
83
|
-
email?: string;
|
|
84
|
-
id?: string;
|
|
85
|
-
resource_path?: string;
|
|
77
|
+
address: string;
|
|
86
78
|
}
|
|
87
79
|
interface TransactionDetails {
|
|
88
80
|
title: string;
|
|
89
81
|
subtitle: string;
|
|
90
|
-
header?: string;
|
|
91
|
-
health?: string;
|
|
92
|
-
subsidebar_label?: string | null;
|
|
93
|
-
}
|
|
94
|
-
interface AdvancedTradeFill {
|
|
95
|
-
fill_price: string;
|
|
96
|
-
product_id: string;
|
|
97
|
-
order_id: string;
|
|
98
|
-
commission: string;
|
|
99
|
-
order_side: 'BUY' | 'SELL';
|
|
100
82
|
}
|
|
101
83
|
export interface CBAppTransaction {
|
|
102
84
|
id: string;
|
|
@@ -109,14 +91,10 @@ export interface CBAppTransaction {
|
|
|
109
91
|
updated_at: string;
|
|
110
92
|
resource: string;
|
|
111
93
|
resource_path: string;
|
|
112
|
-
network
|
|
94
|
+
network: TransactionNetwork;
|
|
113
95
|
from?: TransactionFrom;
|
|
114
96
|
to?: TransactionTo;
|
|
115
97
|
details?: TransactionDetails;
|
|
116
|
-
instant_exchange?: boolean;
|
|
117
|
-
advanced_trade_fill?: AdvancedTradeFill;
|
|
118
|
-
cancelable?: boolean;
|
|
119
|
-
idem?: string;
|
|
120
98
|
}
|
|
121
99
|
/**
|
|
122
100
|
*
|
|
@@ -152,71 +130,6 @@ export interface CBAppDepositWithdrawal {
|
|
|
152
130
|
fee: DepositWithdrawalAmountCurrency;
|
|
153
131
|
payout_at: string;
|
|
154
132
|
}
|
|
155
|
-
interface TransferAmount {
|
|
156
|
-
value: string;
|
|
157
|
-
currency: string;
|
|
158
|
-
}
|
|
159
|
-
interface TransferOwner {
|
|
160
|
-
id: string;
|
|
161
|
-
uuid: string;
|
|
162
|
-
user_uuid: string;
|
|
163
|
-
type: string;
|
|
164
|
-
}
|
|
165
|
-
interface TransferLedgerAccount {
|
|
166
|
-
account_id: string;
|
|
167
|
-
currency: string;
|
|
168
|
-
owner: TransferOwner;
|
|
169
|
-
}
|
|
170
|
-
interface TransferExternalPaymentMethod {
|
|
171
|
-
payment_method_id: string;
|
|
172
|
-
}
|
|
173
|
-
interface TransferSource {
|
|
174
|
-
type: string;
|
|
175
|
-
network: string;
|
|
176
|
-
payment_method_id: string;
|
|
177
|
-
external_payment_method: TransferExternalPaymentMethod;
|
|
178
|
-
}
|
|
179
|
-
interface TransferTarget {
|
|
180
|
-
type: string;
|
|
181
|
-
network: string;
|
|
182
|
-
payment_method_id: string;
|
|
183
|
-
ledger_account: TransferLedgerAccount;
|
|
184
|
-
}
|
|
185
|
-
interface TransferFee {
|
|
186
|
-
title: string;
|
|
187
|
-
description: string;
|
|
188
|
-
amount: TransferAmount;
|
|
189
|
-
type: string;
|
|
190
|
-
}
|
|
191
|
-
export interface CBAppTransferDepositWithdrawal {
|
|
192
|
-
user_entered_amount: TransferAmount;
|
|
193
|
-
amount: TransferAmount;
|
|
194
|
-
total: TransferAmount;
|
|
195
|
-
subtotal: TransferAmount;
|
|
196
|
-
idem: string;
|
|
197
|
-
committed: boolean;
|
|
198
|
-
id: string;
|
|
199
|
-
instant: boolean;
|
|
200
|
-
source: TransferSource;
|
|
201
|
-
target: TransferTarget;
|
|
202
|
-
payout_at: string;
|
|
203
|
-
status: string;
|
|
204
|
-
user_reference: string;
|
|
205
|
-
type: string;
|
|
206
|
-
created_at: string | null;
|
|
207
|
-
updated_at: string | null;
|
|
208
|
-
user_warnings: any[];
|
|
209
|
-
fees: any[];
|
|
210
|
-
total_fee: TransferFee;
|
|
211
|
-
cancellation_reason: string | null;
|
|
212
|
-
hold_days: number;
|
|
213
|
-
nextStep: any | null;
|
|
214
|
-
checkout_url: string;
|
|
215
|
-
requires_completion_step: boolean;
|
|
216
|
-
}
|
|
217
|
-
export interface CBAppTransfer {
|
|
218
|
-
transfer: CBAppTransferDepositWithdrawal;
|
|
219
|
-
}
|
|
220
133
|
/**
|
|
221
134
|
*
|
|
222
135
|
* DATA - Currencies Endpoints
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coinbase-app-client.js","sourceRoot":"","sources":["../../../../src/types/response/coinbase-app-client.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"coinbase-app-client.js","sourceRoot":"","sources":["../../../../src/types/response/coinbase-app-client.ts"],"names":[],"mappings":";AA8KA;;;;GAIG;AAEH;;;;GAIG;AAEH;;;;GAIG"}
|
|
@@ -48,20 +48,12 @@ interface TriggerBracketGTD {
|
|
|
48
48
|
stop_trigger_price: string;
|
|
49
49
|
end_time: string;
|
|
50
50
|
}
|
|
51
|
-
interface TWAPLimitGTD {
|
|
52
|
-
quote_size: string;
|
|
53
|
-
base_size: string;
|
|
54
|
-
start_time: string;
|
|
55
|
-
end_time: string;
|
|
56
|
-
limit_price: string;
|
|
57
|
-
}
|
|
58
51
|
export interface OrderConfiguration {
|
|
59
52
|
market_market_ioc?: MarketMarketIOC;
|
|
60
53
|
sor_limit_ioc?: SORLimitIOC;
|
|
61
54
|
limit_limit_gtc?: LimitLimitGTC;
|
|
62
55
|
limit_limit_gtd?: LimitLimitGTD;
|
|
63
56
|
limit_limit_fok?: LimitLimitFOK;
|
|
64
|
-
twap_limit_gtd?: TWAPLimitGTD;
|
|
65
57
|
stop_limit_stop_limit_gtc?: StopLimitStopLimitGTC;
|
|
66
58
|
stop_limit_stop_limit_gtd?: StopLimitStopLimitGTD;
|
|
67
59
|
trigger_bracket_gtc?: TriggerBracketGTC;
|
package/package.json
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "coinbase-api",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15-beta.0",
|
|
4
4
|
"description": "Node.js SDK for Coinbase's REST APIs and WebSockets, with TypeScript & strong end to end tests.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"clean": "rm -rf dist",
|
|
7
7
|
"build": "npm run clean && tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && bash ./postBuild.sh",
|
|
8
|
-
"test": "jest --passWithNoTests",
|
|
9
|
-
"test:watch": "jest --watch --passWithNoTests"
|
|
8
|
+
"test": "NODE_OPTIONS='--experimental-vm-modules --no-warnings' jest --passWithNoTests --config=jest.config.ts",
|
|
9
|
+
"test:watch:raw": "jest --watch --passWithNoTests",
|
|
10
|
+
"test:watch": "npm run test -- --watch",
|
|
11
|
+
"test:watch:v": "node --no-warnings --experimental-vm-modules $( [ -f ./node_modules/.bin/jest ] && echo ./node_modules/.bin/jest || which jest ) --watch --passWithNoTests",
|
|
12
|
+
"betapublish": "npm publish --tag beta"
|
|
10
13
|
},
|
|
11
14
|
"main": "dist/cjs/index.js",
|
|
12
15
|
"module": "dist/mjs/index.js",
|
|
@@ -29,13 +32,12 @@
|
|
|
29
32
|
"dependencies": {
|
|
30
33
|
"axios": "^1.7.4",
|
|
31
34
|
"isomorphic-ws": "^4.0.1",
|
|
32
|
-
"
|
|
35
|
+
"jose": "^6.0.11",
|
|
33
36
|
"nanoid": "^3.3.7",
|
|
34
37
|
"ws": "^7.4.0"
|
|
35
38
|
},
|
|
36
39
|
"devDependencies": {
|
|
37
40
|
"@types/jest": "^29.5.12",
|
|
38
|
-
"@types/jsonwebtoken": "^9.0.6",
|
|
39
41
|
"@types/node": "^20.11.6",
|
|
40
42
|
"@types/ws": "^8.5.10",
|
|
41
43
|
"@typescript-eslint/eslint-plugin": "^7.1.0",
|