@guiie/buda-mcp 1.4.2 → 1.5.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/.cursor/rules/marketplace-docs-sync.mdc +32 -0
- package/CHANGELOG.md +79 -0
- package/PUBLISH_CHECKLIST.md +40 -88
- package/README.md +446 -78
- package/dist/cache.d.ts +1 -0
- package/dist/cache.d.ts.map +1 -1
- package/dist/cache.js +1 -0
- package/dist/client.d.ts +2 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +18 -1
- package/dist/http.js +97 -6
- package/dist/index.js +42 -3
- package/dist/tools/account.d.ts +19 -0
- package/dist/tools/account.d.ts.map +1 -0
- package/dist/tools/account.js +49 -0
- package/dist/tools/balance.d.ts +29 -0
- package/dist/tools/balance.d.ts.map +1 -0
- package/dist/tools/balance.js +72 -0
- package/dist/tools/banks.d.ts +28 -0
- package/dist/tools/banks.d.ts.map +1 -0
- package/dist/tools/banks.js +68 -0
- package/dist/tools/batch_orders.d.ts +82 -0
- package/dist/tools/batch_orders.d.ts.map +1 -0
- package/dist/tools/batch_orders.js +188 -0
- package/dist/tools/cancel_all_orders.d.ts +34 -0
- package/dist/tools/cancel_all_orders.d.ts.map +1 -0
- package/dist/tools/cancel_all_orders.js +89 -0
- package/dist/tools/cancel_order.js +1 -1
- package/dist/tools/cancel_order_by_client_id.d.ts +34 -0
- package/dist/tools/cancel_order_by_client_id.d.ts.map +1 -0
- package/dist/tools/cancel_order_by_client_id.js +102 -0
- package/dist/tools/dead_mans_switch.d.ts +1 -1
- package/dist/tools/dead_mans_switch.d.ts.map +1 -1
- package/dist/tools/dead_mans_switch.js +33 -3
- package/dist/tools/deposits.d.ts +83 -0
- package/dist/tools/deposits.d.ts.map +1 -0
- package/dist/tools/deposits.js +174 -0
- package/dist/tools/fees.d.ts +34 -0
- package/dist/tools/fees.d.ts.map +1 -0
- package/dist/tools/fees.js +72 -0
- package/dist/tools/lightning.d.ts +68 -0
- package/dist/tools/lightning.d.ts.map +1 -0
- package/dist/tools/lightning.js +185 -0
- package/dist/tools/order_lookup.d.ts +50 -0
- package/dist/tools/order_lookup.d.ts.map +1 -0
- package/dist/tools/order_lookup.js +112 -0
- package/dist/tools/place_order.d.ts +30 -0
- package/dist/tools/place_order.d.ts.map +1 -1
- package/dist/tools/place_order.js +131 -2
- package/dist/tools/quotation.d.ts +44 -0
- package/dist/tools/quotation.d.ts.map +1 -0
- package/dist/tools/quotation.js +99 -0
- package/dist/tools/receive_addresses.d.ts +83 -0
- package/dist/tools/receive_addresses.d.ts.map +1 -0
- package/dist/tools/receive_addresses.js +185 -0
- package/dist/tools/remittance_recipients.d.ts +54 -0
- package/dist/tools/remittance_recipients.d.ts.map +1 -0
- package/dist/tools/remittance_recipients.js +106 -0
- package/dist/tools/remittances.d.ts +120 -0
- package/dist/tools/remittances.d.ts.map +1 -0
- package/dist/tools/remittances.js +261 -0
- package/dist/tools/simulate_order.d.ts.map +1 -1
- package/dist/tools/simulate_order.js +2 -1
- package/dist/tools/technical_indicators.d.ts.map +1 -1
- package/dist/tools/technical_indicators.js +2 -1
- package/dist/tools/withdrawals.d.ts +93 -0
- package/dist/tools/withdrawals.d.ts.map +1 -0
- package/dist/tools/withdrawals.js +225 -0
- package/dist/types.d.ts +155 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +4 -1
- package/dist/validation.d.ts +11 -0
- package/dist/validation.d.ts.map +1 -1
- package/dist/validation.js +38 -0
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +8 -1
- package/marketplace/README.md +1 -1
- package/marketplace/claude-listing.md +101 -2
- package/marketplace/gemini-tools.json +478 -1
- package/marketplace/openapi.yaml +160 -1
- package/package.json +2 -1
- package/server.json +2 -2
- package/src/cache.ts +1 -0
- package/src/client.ts +23 -1
- package/src/http.ts +105 -6
- package/src/index.ts +40 -3
- package/src/tools/account.ts +66 -0
- package/src/tools/balance.ts +94 -0
- package/src/tools/banks.ts +94 -0
- package/src/tools/batch_orders.ts +238 -0
- package/src/tools/cancel_all_orders.ts +117 -0
- package/src/tools/cancel_order.ts +1 -1
- package/src/tools/cancel_order_by_client_id.ts +132 -0
- package/src/tools/dead_mans_switch.ts +39 -3
- package/src/tools/deposits.ts +230 -0
- package/src/tools/fees.ts +91 -0
- package/src/tools/lightning.ts +247 -0
- package/src/tools/order_lookup.ts +139 -0
- package/src/tools/place_order.ts +151 -2
- package/src/tools/quotation.ts +124 -0
- package/src/tools/receive_addresses.ts +242 -0
- package/src/tools/remittance_recipients.ts +139 -0
- package/src/tools/remittances.ts +325 -0
- package/src/tools/simulate_order.ts +1 -0
- package/src/tools/technical_indicators.ts +2 -1
- package/src/tools/withdrawals.ts +287 -0
- package/src/types.ts +210 -0
- package/src/utils.ts +3 -1
- package/src/validation.ts +45 -0
- package/src/version.ts +11 -3
- package/test/run-all.ts +16 -0
- package/test/unit.ts +2149 -1
package/dist/types.d.ts
CHANGED
|
@@ -108,4 +108,159 @@ export interface OhlcvCandle {
|
|
|
108
108
|
volume: number;
|
|
109
109
|
trade_count: number;
|
|
110
110
|
}
|
|
111
|
+
export interface PaginationMeta {
|
|
112
|
+
current_page: number;
|
|
113
|
+
total_count: number;
|
|
114
|
+
total_pages: number;
|
|
115
|
+
}
|
|
116
|
+
export interface MeResponse {
|
|
117
|
+
me: {
|
|
118
|
+
id: number;
|
|
119
|
+
email: string;
|
|
120
|
+
name: string | null;
|
|
121
|
+
monthly_transacted: Amount;
|
|
122
|
+
pubsub_key: string | null;
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
export interface SingleBalanceResponse {
|
|
126
|
+
balance: Balance;
|
|
127
|
+
}
|
|
128
|
+
export interface Fee {
|
|
129
|
+
name: string;
|
|
130
|
+
fee_type: string;
|
|
131
|
+
base_fee: Amount;
|
|
132
|
+
percent: string | null;
|
|
133
|
+
}
|
|
134
|
+
export interface FeesResponse {
|
|
135
|
+
fees: Fee[];
|
|
136
|
+
}
|
|
137
|
+
export interface Deposit {
|
|
138
|
+
id: number;
|
|
139
|
+
state: string;
|
|
140
|
+
currency: string;
|
|
141
|
+
amount: Amount;
|
|
142
|
+
fee: Amount;
|
|
143
|
+
created_at: string;
|
|
144
|
+
updated_at: string;
|
|
145
|
+
transfer_account_id: number | null;
|
|
146
|
+
transaction_hash: string | null;
|
|
147
|
+
}
|
|
148
|
+
export interface DepositsResponse {
|
|
149
|
+
deposits: Deposit[];
|
|
150
|
+
meta: PaginationMeta;
|
|
151
|
+
}
|
|
152
|
+
export interface SingleDepositResponse {
|
|
153
|
+
deposit: Deposit;
|
|
154
|
+
}
|
|
155
|
+
export interface Withdrawal {
|
|
156
|
+
id: number;
|
|
157
|
+
state: string;
|
|
158
|
+
currency: string;
|
|
159
|
+
amount: Amount;
|
|
160
|
+
fee: Amount;
|
|
161
|
+
address: string | null;
|
|
162
|
+
tx_hash: string | null;
|
|
163
|
+
bank_account_id: number | null;
|
|
164
|
+
created_at: string;
|
|
165
|
+
updated_at: string;
|
|
166
|
+
}
|
|
167
|
+
export interface WithdrawalsResponse {
|
|
168
|
+
withdrawals: Withdrawal[];
|
|
169
|
+
meta: PaginationMeta;
|
|
170
|
+
}
|
|
171
|
+
export interface SingleWithdrawalResponse {
|
|
172
|
+
withdrawal: Withdrawal;
|
|
173
|
+
}
|
|
174
|
+
export interface ReceiveAddress {
|
|
175
|
+
id: number;
|
|
176
|
+
address: string;
|
|
177
|
+
currency: string;
|
|
178
|
+
created_at: string;
|
|
179
|
+
label: string | null;
|
|
180
|
+
}
|
|
181
|
+
export interface ReceiveAddressesResponse {
|
|
182
|
+
receive_addresses: ReceiveAddress[];
|
|
183
|
+
}
|
|
184
|
+
export interface SingleReceiveAddressResponse {
|
|
185
|
+
receive_address: ReceiveAddress;
|
|
186
|
+
}
|
|
187
|
+
export interface Remittance {
|
|
188
|
+
id: number;
|
|
189
|
+
state: string;
|
|
190
|
+
currency: string;
|
|
191
|
+
amount: Amount;
|
|
192
|
+
recipient_id: number | null;
|
|
193
|
+
created_at: string;
|
|
194
|
+
expires_at: string | null;
|
|
195
|
+
}
|
|
196
|
+
export interface RemittancesResponse {
|
|
197
|
+
remittances: Remittance[];
|
|
198
|
+
meta: PaginationMeta;
|
|
199
|
+
}
|
|
200
|
+
export interface SingleRemittanceResponse {
|
|
201
|
+
remittance: Remittance;
|
|
202
|
+
}
|
|
203
|
+
export interface RemittanceRecipient {
|
|
204
|
+
id: number;
|
|
205
|
+
name: string;
|
|
206
|
+
bank: string;
|
|
207
|
+
account_number: string;
|
|
208
|
+
currency: string;
|
|
209
|
+
country: string | null;
|
|
210
|
+
}
|
|
211
|
+
export interface RemittanceRecipientsResponse {
|
|
212
|
+
remittance_recipients: RemittanceRecipient[];
|
|
213
|
+
meta: PaginationMeta;
|
|
214
|
+
}
|
|
215
|
+
export interface SingleRemittanceRecipientResponse {
|
|
216
|
+
remittance_recipient: RemittanceRecipient;
|
|
217
|
+
}
|
|
218
|
+
export interface Quotation {
|
|
219
|
+
id: number | null;
|
|
220
|
+
type: string;
|
|
221
|
+
market_id: string;
|
|
222
|
+
amount: Amount;
|
|
223
|
+
limit: Amount | null;
|
|
224
|
+
base_balance_change: Amount;
|
|
225
|
+
quote_balance_change: Amount;
|
|
226
|
+
fee_amount: Amount;
|
|
227
|
+
order_amount: Amount;
|
|
228
|
+
}
|
|
229
|
+
export interface QuotationResponse {
|
|
230
|
+
quotation: Quotation;
|
|
231
|
+
}
|
|
232
|
+
export interface Bank {
|
|
233
|
+
id: string;
|
|
234
|
+
name: string;
|
|
235
|
+
country: string | null;
|
|
236
|
+
}
|
|
237
|
+
export interface BanksResponse {
|
|
238
|
+
banks: Bank[];
|
|
239
|
+
}
|
|
240
|
+
export interface CancelAllOrdersResponse {
|
|
241
|
+
canceled_count: number;
|
|
242
|
+
}
|
|
243
|
+
export interface LightningWithdrawal {
|
|
244
|
+
id: number;
|
|
245
|
+
state: string;
|
|
246
|
+
amount: Amount;
|
|
247
|
+
fee: Amount;
|
|
248
|
+
payment_hash: string;
|
|
249
|
+
created_at: string;
|
|
250
|
+
}
|
|
251
|
+
export interface LightningWithdrawalResponse {
|
|
252
|
+
lightning_withdrawal: LightningWithdrawal;
|
|
253
|
+
}
|
|
254
|
+
export interface LightningInvoice {
|
|
255
|
+
id: number;
|
|
256
|
+
payment_request: string;
|
|
257
|
+
amount: Amount;
|
|
258
|
+
description: string | null;
|
|
259
|
+
expires_at: string;
|
|
260
|
+
state: string;
|
|
261
|
+
created_at: string;
|
|
262
|
+
}
|
|
263
|
+
export interface LightningInvoiceResponse {
|
|
264
|
+
lightning_network_invoice: LightningInvoice;
|
|
265
|
+
}
|
|
111
266
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAItC,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,yBAAyB,EAAE,MAAM,CAAC;IAClC,yBAAyB,EAAE,MAAM,CAAC;IAClC,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7C,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9C;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;CAChB;AAID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,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,IAAI,EAAE,CAAC;CACf;AAID,MAAM,WAAW,uBAAuB;IACtC,cAAc,EAAE,MAAM,CAAC;CACxB;AAID,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,2BAA2B;IAC1C,oBAAoB,EAAE,mBAAmB,CAAC;CAC3C;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,wBAAwB;IACvC,yBAAyB,EAAE,gBAAgB,CAAC;CAC7C"}
|
package/dist/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEtD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEtD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAIjF;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,CAI/E;AAWD;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,EAC3C,MAAM,EAAE,MAAM,GACb,WAAW,EAAE,CAoCf"}
|
package/dist/utils.js
CHANGED
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
* All numeric strings are cast to float via parseFloat.
|
|
4
4
|
*/
|
|
5
5
|
export function flattenAmount(amount) {
|
|
6
|
-
|
|
6
|
+
const value = parseFloat(amount[0]);
|
|
7
|
+
if (isNaN(value))
|
|
8
|
+
throw new Error(`Invalid amount value: "${amount[0]}"`);
|
|
9
|
+
return { value, currency: amount[1] };
|
|
7
10
|
}
|
|
8
11
|
/**
|
|
9
12
|
* Returns a liquidity rating based on the bid/ask spread percentage.
|
package/dist/validation.d.ts
CHANGED
|
@@ -3,4 +3,15 @@
|
|
|
3
3
|
* Returns an error message string if invalid, or null if valid.
|
|
4
4
|
*/
|
|
5
5
|
export declare function validateMarketId(id: string): string | null;
|
|
6
|
+
/**
|
|
7
|
+
* Validates a currency code (e.g. "BTC", "CLP", "USDC").
|
|
8
|
+
* Returns an error message string if invalid, or null if valid.
|
|
9
|
+
*/
|
|
10
|
+
export declare function validateCurrency(id: string): string | null;
|
|
11
|
+
/**
|
|
12
|
+
* Validates a crypto withdrawal address against known per-currency formats.
|
|
13
|
+
* Returns an error message string if the address is invalid, or null if valid
|
|
14
|
+
* (including null for unknown currencies, where the exchange is the last line of defence).
|
|
15
|
+
*/
|
|
16
|
+
export declare function validateCryptoAddress(address: string, currency: string): string | null;
|
|
6
17
|
//# sourceMappingURL=validation.d.ts.map
|
package/dist/validation.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../src/validation.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAS1D"}
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../src/validation.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAS1D;AAID;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAQ1D;AAcD;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAUtF"}
|
package/dist/validation.js
CHANGED
|
@@ -11,4 +11,42 @@ export function validateMarketId(id) {
|
|
|
11
11
|
}
|
|
12
12
|
return null;
|
|
13
13
|
}
|
|
14
|
+
const CURRENCY_RE = /^[A-Z0-9]{2,10}$/i;
|
|
15
|
+
/**
|
|
16
|
+
* Validates a currency code (e.g. "BTC", "CLP", "USDC").
|
|
17
|
+
* Returns an error message string if invalid, or null if valid.
|
|
18
|
+
*/
|
|
19
|
+
export function validateCurrency(id) {
|
|
20
|
+
if (!CURRENCY_RE.test(id)) {
|
|
21
|
+
return (`Invalid currency "${id}". ` +
|
|
22
|
+
`Expected 2–10 alphanumeric characters (e.g. "BTC", "CLP", "USDC").`);
|
|
23
|
+
}
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
// Per-currency address format rules.
|
|
27
|
+
// Unknown currencies pass through (undefined rule) — the exchange validates those.
|
|
28
|
+
const ADDRESS_RULES = {
|
|
29
|
+
BTC: /^(bc1[a-z0-9]{6,87}|[13][a-zA-HJ-NP-Z0-9]{25,34})$/,
|
|
30
|
+
ETH: /^0x[0-9a-fA-F]{40}$/,
|
|
31
|
+
USDC: /^0x[0-9a-fA-F]{40}$/,
|
|
32
|
+
USDT: /^0x[0-9a-fA-F]{40}$/,
|
|
33
|
+
LTC: /^(ltc1[a-z0-9]{6,87}|[LM3][a-zA-HJ-NP-Z0-9]{25,34})$/,
|
|
34
|
+
BCH: /^(bitcoincash:)?[qp][a-z0-9]{41}$/,
|
|
35
|
+
XRP: /^r[1-9A-HJ-NP-Za-km-z]{24,33}$/,
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Validates a crypto withdrawal address against known per-currency formats.
|
|
39
|
+
* Returns an error message string if the address is invalid, or null if valid
|
|
40
|
+
* (including null for unknown currencies, where the exchange is the last line of defence).
|
|
41
|
+
*/
|
|
42
|
+
export function validateCryptoAddress(address, currency) {
|
|
43
|
+
const rule = ADDRESS_RULES[currency.toUpperCase()];
|
|
44
|
+
if (!rule)
|
|
45
|
+
return null;
|
|
46
|
+
if (!rule.test(address)) {
|
|
47
|
+
return (`Invalid ${currency.toUpperCase()} address format. ` +
|
|
48
|
+
`Double-check the destination address — crypto withdrawals are irreversible.`);
|
|
49
|
+
}
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
14
52
|
//# sourceMappingURL=validation.js.map
|
package/dist/version.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,OAAO,EAAE,MAAiB,CAAC"}
|
package/dist/version.js
CHANGED
|
@@ -2,5 +2,12 @@ import { readFileSync } from "fs";
|
|
|
2
2
|
import { fileURLToPath } from "url";
|
|
3
3
|
import { dirname, join } from "path";
|
|
4
4
|
const _dir = dirname(fileURLToPath(import.meta.url));
|
|
5
|
-
|
|
5
|
+
let _version = "unknown";
|
|
6
|
+
try {
|
|
7
|
+
_version = JSON.parse(readFileSync(join(_dir, "../package.json"), "utf8")).version;
|
|
8
|
+
}
|
|
9
|
+
catch {
|
|
10
|
+
// package.json not found in deployment — use fallback
|
|
11
|
+
}
|
|
12
|
+
export const VERSION = _version;
|
|
6
13
|
//# sourceMappingURL=version.js.map
|
package/marketplace/README.md
CHANGED
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
|
|
13
13
|
Real-time market data from [Buda.com](https://www.buda.com/), the leading cryptocurrency exchange operating in Chile, Colombia, and Peru. All public data is sourced from Buda's public REST API v2 — no API key required.
|
|
14
14
|
|
|
15
|
-
Use this server to query live prices, spreads, order books, OHLCV candles, trade history, volume, and cross-market arbitrage opportunities for all BTC, ETH, and altcoin markets quoted in CLP, COP, PEN, and USDC. Optional API credentials unlock account tools for balances and
|
|
15
|
+
Use this server to query live prices, spreads, order books, OHLCV candles, trade history, volume, and cross-market arbitrage opportunities for all BTC, ETH, and altcoin markets quoted in CLP, COP, PEN, and USDC. Optional API credentials unlock account tools for balances, order management, withdrawals, deposits, and Lightning Network payments.
|
|
16
16
|
|
|
17
|
-
**v1.
|
|
17
|
+
**v1.5.1** is a security hardening release: HTTP startup guard for missing `MCP_AUTH_TOKEN`, rate limiting on `/mcp`, crypto address format validation in `create_withdrawal`, BOLT-11 invoice validation in `lightning_withdrawal`, dead man's switch blocked on HTTP transport, and optional `max_notional` cap for `place_batch_orders`.
|
|
18
18
|
|
|
19
19
|
---
|
|
20
20
|
|
|
@@ -78,13 +78,28 @@ Composite sentiment score (−100 to +100) from three components: 24h price vari
|
|
|
78
78
|
RSI (14), MACD (12/26/9), Bollinger Bands (20, 2σ), SMA 20, and SMA 50 — computed server-side from Buda trade history (no external libraries). Returns latest values + signal interpretations. Returns a structured warning if fewer than 50 candles are available after aggregation. Includes `disclaimer`.
|
|
79
79
|
**Parameters:** `market_id` *(required)*, `period` (`1h`/`4h`/`1d`, default `1h`), `limit` *(optional, 500–1000)*.
|
|
80
80
|
|
|
81
|
+
### `get_available_banks`
|
|
82
|
+
Banks available for deposits and withdrawals for a given fiat currency. Returns an array of `{ id, name, country }` objects, or an empty array if none are available. Cached 60 s.
|
|
83
|
+
**Parameters:** `currency` *(required)* — e.g. `CLP`, `COP`, `PEN`.
|
|
84
|
+
|
|
85
|
+
### `get_real_quotation`
|
|
86
|
+
Server-side buy or sell quotation from Buda using the live order book. Returns the exact fill price, total cost with fees, and applied fee rate. Does not place an order.
|
|
87
|
+
**Parameters:** `market_id` *(required)*, `type` (`Bid`/`Ask`) *(required)*, `amount` *(required)*, `limit` *(optional — limit price in quote currency)*.
|
|
88
|
+
|
|
81
89
|
### Authenticated tools (require `BUDA_API_KEY` + `BUDA_API_SECRET`)
|
|
82
90
|
|
|
83
91
|
> **Important:** Authenticated instances must run locally only — never expose a server with API credentials publicly.
|
|
84
92
|
|
|
93
|
+
### `get_account_info`
|
|
94
|
+
Returns the authenticated user's profile: email, display name, pubsub key, and monthly transacted amounts. Read-only.
|
|
95
|
+
|
|
85
96
|
### `get_balances`
|
|
86
97
|
All currency balances as flat typed objects: total, available, frozen, and pending withdrawal amounts as floats with `_currency` suffix fields.
|
|
87
98
|
|
|
99
|
+
### `get_balance`
|
|
100
|
+
Balance for a single currency: total, available, frozen, and pending withdrawal amounts as floats with `_currency` fields. Use when you only need one currency instead of fetching all.
|
|
101
|
+
**Parameters:** `currency` *(required)* — e.g. `BTC`, `CLP`, `USDC`.
|
|
102
|
+
|
|
88
103
|
### `get_orders`
|
|
89
104
|
Orders for a given market as flat typed objects. All monetary amounts are floats with `_currency` fields. Filterable by state (`pending`, `active`, `traded`, `canceled`).
|
|
90
105
|
**Parameters:** `market_id` *(required)*, `state` *(optional)*, `per` *(optional)*, `page` *(optional)*.
|
|
@@ -97,6 +112,90 @@ Place a limit or market order. Requires `confirmation_token="CONFIRM"` to preven
|
|
|
97
112
|
Cancel an open order by ID. Requires `confirmation_token="CONFIRM"`.
|
|
98
113
|
**Parameters:** `order_id`, `confirmation_token`.
|
|
99
114
|
|
|
115
|
+
### `cancel_all_orders`
|
|
116
|
+
Cancel all open orders in a specific market or across all markets (`market_id="*"`). Requires `confirmation_token="CONFIRM"`. Market validation fires before any API call.
|
|
117
|
+
**Parameters:** `market_id` (or `"*"` for all), `confirmation_token`.
|
|
118
|
+
|
|
119
|
+
### `cancel_order_by_client_id`
|
|
120
|
+
Cancel an open order by its client-assigned string ID. Requires `confirmation_token="CONFIRM"`. Returns the same flat order shape as `get_order`.
|
|
121
|
+
**Parameters:** `client_id`, `confirmation_token`.
|
|
122
|
+
|
|
123
|
+
### `get_order`
|
|
124
|
+
Fetch a single order by its numeric ID with full detail. All monetary amounts are floats with `_currency` fields.
|
|
125
|
+
**Parameters:** `order_id` *(required)*.
|
|
126
|
+
|
|
127
|
+
### `get_order_by_client_id`
|
|
128
|
+
Fetch a single order by the client-assigned string ID set at placement time.
|
|
129
|
+
**Parameters:** `client_id` *(required)*.
|
|
130
|
+
|
|
131
|
+
### `place_batch_orders`
|
|
132
|
+
Place up to 20 orders sequentially. All orders are pre-validated before any API call. Partial failures do not roll back placed orders; a `warning` field surfaces this. Use `max_notional` to cap total exposure (sum of `amount × limit_price` for limit orders; market orders contribute 0). Returns `{ results, total, succeeded, failed }`.
|
|
133
|
+
**Parameters:** `orders` (array of 1–20 order objects), `max_notional` *(optional cap)*, `confirmation_token`.
|
|
134
|
+
|
|
135
|
+
### `get_network_fees`
|
|
136
|
+
Fee schedule for deposits or withdrawals of a given currency (name, flat fee, minimum, maximum, and whether the fee is a percentage). Useful before initiating a withdrawal.
|
|
137
|
+
**Parameters:** `currency` *(required)* — e.g. `BTC`, `ETH`, `CLP`. `type` *(required)* — `deposit` or `withdrawal`.
|
|
138
|
+
|
|
139
|
+
### `get_withdrawal_history`
|
|
140
|
+
Withdrawal history for a currency, optionally filtered by state and paginated. Amounts are floats with `_currency` fields.
|
|
141
|
+
**Parameters:** `currency` *(required)*, `state` *(optional: `pending_signature`/`pending`/`confirmed`/`rejected`/`anulled`)*, `per` *(optional)*, `page` *(optional)*.
|
|
142
|
+
|
|
143
|
+
### `create_withdrawal`
|
|
144
|
+
Create a crypto or fiat withdrawal. Exactly one of `address` (crypto) or `bank_account_id` (fiat) must be provided. **WARNING: Crypto withdrawals are irreversible — verify the destination address carefully before confirming.** Requires `confirmation_token="CONFIRM"`.
|
|
145
|
+
**Parameters:** `currency`, `amount`, `address` *(crypto)*, `network` *(optional)*, `bank_account_id` *(fiat)*, `confirmation_token`.
|
|
146
|
+
|
|
147
|
+
### `get_deposit_history`
|
|
148
|
+
Deposit history for a currency, optionally filtered by state and paginated. Amounts are floats with `_currency` fields.
|
|
149
|
+
**Parameters:** `currency` *(required)*, `state` *(optional: `pending_info`/`pending`/`confirmed`/`anulled`/`retained`)*, `per` *(optional)*, `page` *(optional)*.
|
|
150
|
+
|
|
151
|
+
### `create_fiat_deposit`
|
|
152
|
+
Record a fiat deposit. Guard is critical — calling twice creates duplicates. Requires `confirmation_token="CONFIRM"`.
|
|
153
|
+
**Parameters:** `currency`, `amount`, `bank` *(optional)*, `confirmation_token`.
|
|
154
|
+
|
|
155
|
+
### `lightning_withdrawal`
|
|
156
|
+
Pay a BOLT-11 Lightning invoice from the LN-BTC reserve. Requires `confirmation_token="CONFIRM"`. Returns `{ id, state, amount, fee, payment_hash, created_at }`.
|
|
157
|
+
**Parameters:** `invoice`, `confirmation_token`.
|
|
158
|
+
|
|
159
|
+
### `create_lightning_invoice`
|
|
160
|
+
Create a Lightning receive invoice. No confirmation required. Returns `{ id, payment_request, amount_satoshis, description, expires_at, state, created_at }`.
|
|
161
|
+
**Parameters:** `amount_satoshis`, `description` *(optional, max 140 chars)*, `expiry_seconds` *(optional, 60–86400)*.
|
|
162
|
+
|
|
163
|
+
### `create_receive_address`
|
|
164
|
+
Generate a new crypto deposit address for a currency. Not idempotent — each call creates a new address. Crypto only. Requires `confirmation_token="CONFIRM"`.
|
|
165
|
+
**Parameters:** `currency` *(required)* — e.g. `BTC`, `ETH`. `confirmation_token` *(required)*.
|
|
166
|
+
|
|
167
|
+
### `list_receive_addresses`
|
|
168
|
+
List all receive (deposit) addresses for a currency.
|
|
169
|
+
**Parameters:** `currency` *(required)*.
|
|
170
|
+
|
|
171
|
+
### `get_receive_address`
|
|
172
|
+
Fetch a specific receive address by its numeric ID.
|
|
173
|
+
**Parameters:** `currency` *(required)*, `id` *(required)*.
|
|
174
|
+
|
|
175
|
+
### `list_remittance_recipients`
|
|
176
|
+
List saved remittance recipients (bank accounts) for fiat transfers, with pagination.
|
|
177
|
+
**Parameters:** `per` *(optional)*, `page` *(optional)*.
|
|
178
|
+
|
|
179
|
+
### `get_remittance_recipient`
|
|
180
|
+
Fetch a single saved remittance recipient by ID.
|
|
181
|
+
**Parameters:** `id` *(required)*.
|
|
182
|
+
|
|
183
|
+
### `list_remittances`
|
|
184
|
+
List past fiat remittance transfers with pagination. Amounts are floats with `_currency` fields.
|
|
185
|
+
**Parameters:** `per` *(optional)*, `page` *(optional)*.
|
|
186
|
+
|
|
187
|
+
### `quote_remittance`
|
|
188
|
+
Create a time-limited remittance quote (does not transfer funds). Follow with `accept_remittance_quote` to execute. Not idempotent — each call creates a new remittance record. Requires `confirmation_token="CONFIRM"`.
|
|
189
|
+
**Parameters:** `currency` *(required)*, `amount` *(required)*, `recipient_id` *(required)*, `confirmation_token` *(required)*.
|
|
190
|
+
|
|
191
|
+
### `accept_remittance_quote`
|
|
192
|
+
Accept and execute a remittance quote. **Irreversible.** Requires `confirmation_token="CONFIRM"`.
|
|
193
|
+
**Parameters:** `id` *(required — quote ID)*, `confirmation_token`.
|
|
194
|
+
|
|
195
|
+
### `get_remittance`
|
|
196
|
+
Fetch the status and details of a single remittance by ID.
|
|
197
|
+
**Parameters:** `id` *(required)*.
|
|
198
|
+
|
|
100
199
|
### `schedule_cancel_all`
|
|
101
200
|
**WARNING: timer state is lost on server restart. Use only on locally-run instances.**
|
|
102
201
|
Arms an in-memory dead man's switch: if not renewed within `ttl_seconds`, all open orders for the market are automatically cancelled. Requires `confirmation_token="CONFIRM"`.
|