@guiie/buda-mcp 1.4.2 → 1.5.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.
Files changed (95) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/dist/cache.d.ts +1 -0
  3. package/dist/cache.d.ts.map +1 -1
  4. package/dist/cache.js +1 -0
  5. package/dist/client.d.ts +1 -0
  6. package/dist/client.d.ts.map +1 -1
  7. package/dist/client.js +16 -0
  8. package/dist/http.js +55 -0
  9. package/dist/index.js +30 -0
  10. package/dist/tools/account.d.ts +19 -0
  11. package/dist/tools/account.d.ts.map +1 -0
  12. package/dist/tools/account.js +49 -0
  13. package/dist/tools/balance.d.ts +29 -0
  14. package/dist/tools/balance.d.ts.map +1 -0
  15. package/dist/tools/balance.js +72 -0
  16. package/dist/tools/banks.d.ts +28 -0
  17. package/dist/tools/banks.d.ts.map +1 -0
  18. package/dist/tools/banks.js +68 -0
  19. package/dist/tools/batch_orders.d.ts +77 -0
  20. package/dist/tools/batch_orders.d.ts.map +1 -0
  21. package/dist/tools/batch_orders.js +154 -0
  22. package/dist/tools/cancel_all_orders.d.ts +34 -0
  23. package/dist/tools/cancel_all_orders.d.ts.map +1 -0
  24. package/dist/tools/cancel_all_orders.js +89 -0
  25. package/dist/tools/cancel_order_by_client_id.d.ts +34 -0
  26. package/dist/tools/cancel_order_by_client_id.d.ts.map +1 -0
  27. package/dist/tools/cancel_order_by_client_id.js +102 -0
  28. package/dist/tools/deposits.d.ts +83 -0
  29. package/dist/tools/deposits.d.ts.map +1 -0
  30. package/dist/tools/deposits.js +174 -0
  31. package/dist/tools/fees.d.ts +34 -0
  32. package/dist/tools/fees.d.ts.map +1 -0
  33. package/dist/tools/fees.js +72 -0
  34. package/dist/tools/lightning.d.ts +68 -0
  35. package/dist/tools/lightning.d.ts.map +1 -0
  36. package/dist/tools/lightning.js +171 -0
  37. package/dist/tools/order_lookup.d.ts +50 -0
  38. package/dist/tools/order_lookup.d.ts.map +1 -0
  39. package/dist/tools/order_lookup.js +112 -0
  40. package/dist/tools/place_order.d.ts +30 -0
  41. package/dist/tools/place_order.d.ts.map +1 -1
  42. package/dist/tools/place_order.js +100 -2
  43. package/dist/tools/quotation.d.ts +44 -0
  44. package/dist/tools/quotation.d.ts.map +1 -0
  45. package/dist/tools/quotation.js +99 -0
  46. package/dist/tools/receive_addresses.d.ts +78 -0
  47. package/dist/tools/receive_addresses.d.ts.map +1 -0
  48. package/dist/tools/receive_addresses.js +161 -0
  49. package/dist/tools/remittance_recipients.d.ts +54 -0
  50. package/dist/tools/remittance_recipients.d.ts.map +1 -0
  51. package/dist/tools/remittance_recipients.js +106 -0
  52. package/dist/tools/remittances.d.ts +115 -0
  53. package/dist/tools/remittances.d.ts.map +1 -0
  54. package/dist/tools/remittances.js +237 -0
  55. package/dist/tools/simulate_order.d.ts.map +1 -1
  56. package/dist/tools/simulate_order.js +2 -1
  57. package/dist/tools/withdrawals.d.ts +93 -0
  58. package/dist/tools/withdrawals.d.ts.map +1 -0
  59. package/dist/tools/withdrawals.js +215 -0
  60. package/dist/types.d.ts +155 -0
  61. package/dist/types.d.ts.map +1 -1
  62. package/dist/validation.d.ts +5 -0
  63. package/dist/validation.d.ts.map +1 -1
  64. package/dist/validation.js +12 -0
  65. package/marketplace/README.md +1 -1
  66. package/marketplace/claude-listing.md +30 -2
  67. package/marketplace/gemini-tools.json +155 -1
  68. package/marketplace/openapi.yaml +1 -1
  69. package/package.json +1 -1
  70. package/server.json +2 -2
  71. package/src/cache.ts +1 -0
  72. package/src/client.ts +20 -0
  73. package/src/http.ts +55 -0
  74. package/src/index.ts +30 -0
  75. package/src/tools/account.ts +66 -0
  76. package/src/tools/balance.ts +94 -0
  77. package/src/tools/banks.ts +94 -0
  78. package/src/tools/batch_orders.ts +199 -0
  79. package/src/tools/cancel_all_orders.ts +117 -0
  80. package/src/tools/cancel_order_by_client_id.ts +132 -0
  81. package/src/tools/deposits.ts +230 -0
  82. package/src/tools/fees.ts +91 -0
  83. package/src/tools/lightning.ts +231 -0
  84. package/src/tools/order_lookup.ts +139 -0
  85. package/src/tools/place_order.ts +119 -2
  86. package/src/tools/quotation.ts +124 -0
  87. package/src/tools/receive_addresses.ts +216 -0
  88. package/src/tools/remittance_recipients.ts +139 -0
  89. package/src/tools/remittances.ts +299 -0
  90. package/src/tools/simulate_order.ts +1 -0
  91. package/src/tools/withdrawals.ts +276 -0
  92. package/src/types.ts +210 -0
  93. package/src/validation.ts +16 -0
  94. package/test/run-all.ts +16 -0
  95. package/test/unit.ts +1905 -0
@@ -0,0 +1,215 @@
1
+ import { z } from "zod";
2
+ import { BudaApiError } from "../client.js";
3
+ import { validateCurrency } from "../validation.js";
4
+ import { flattenAmount } from "../utils.js";
5
+ export const getWithdrawalHistoryToolSchema = {
6
+ name: "get_withdrawal_history",
7
+ description: "Returns withdrawal history for a currency on the authenticated Buda.com account. " +
8
+ "Supports state filtering and pagination. All amounts are floats with separate _currency fields. " +
9
+ "Requires BUDA_API_KEY and BUDA_API_SECRET. " +
10
+ "Example: 'Show my pending CLP withdrawals.'",
11
+ inputSchema: {
12
+ type: "object",
13
+ properties: {
14
+ currency: {
15
+ type: "string",
16
+ description: "Currency code (e.g. 'BTC', 'CLP').",
17
+ },
18
+ state: {
19
+ type: "string",
20
+ description: "Filter by state: 'pending_signature', 'pending', 'confirmed', 'rejected', 'anulled'.",
21
+ },
22
+ per: {
23
+ type: "number",
24
+ description: "Results per page (default: 20, max: 300).",
25
+ },
26
+ page: {
27
+ type: "number",
28
+ description: "Page number (default: 1).",
29
+ },
30
+ },
31
+ required: ["currency"],
32
+ },
33
+ };
34
+ function normalizeWithdrawal(w) {
35
+ const amount = flattenAmount(w.amount);
36
+ const fee = flattenAmount(w.fee);
37
+ return {
38
+ id: w.id,
39
+ state: w.state,
40
+ currency: w.currency,
41
+ amount: amount.value,
42
+ amount_currency: amount.currency,
43
+ fee: fee.value,
44
+ fee_currency: fee.currency,
45
+ address: w.address,
46
+ tx_hash: w.tx_hash,
47
+ bank_account_id: w.bank_account_id,
48
+ created_at: w.created_at,
49
+ updated_at: w.updated_at,
50
+ };
51
+ }
52
+ export async function handleGetWithdrawalHistory(args, client) {
53
+ const { currency, state, per, page } = args;
54
+ const validationError = validateCurrency(currency);
55
+ if (validationError) {
56
+ return {
57
+ content: [{ type: "text", text: JSON.stringify({ error: validationError, code: "INVALID_CURRENCY" }) }],
58
+ isError: true,
59
+ };
60
+ }
61
+ try {
62
+ const params = {};
63
+ if (state)
64
+ params.state = state;
65
+ if (per !== undefined)
66
+ params.per = per;
67
+ if (page !== undefined)
68
+ params.page = page;
69
+ const data = await client.get(`/currencies/${currency.toUpperCase()}/withdrawals`, Object.keys(params).length > 0 ? params : undefined);
70
+ return {
71
+ content: [
72
+ {
73
+ type: "text",
74
+ text: JSON.stringify({
75
+ withdrawals: data.withdrawals.map(normalizeWithdrawal),
76
+ meta: data.meta,
77
+ }, null, 2),
78
+ },
79
+ ],
80
+ };
81
+ }
82
+ catch (err) {
83
+ const msg = err instanceof BudaApiError
84
+ ? { error: err.message, code: err.status, path: err.path }
85
+ : { error: String(err), code: "UNKNOWN" };
86
+ return {
87
+ content: [{ type: "text", text: JSON.stringify(msg) }],
88
+ isError: true,
89
+ };
90
+ }
91
+ }
92
+ export const createWithdrawalToolSchema = {
93
+ name: "create_withdrawal",
94
+ description: "Create a withdrawal on Buda.com. Supports both crypto (address) and fiat (bank_account_id) withdrawals. " +
95
+ "Exactly one of address or bank_account_id must be provided. " +
96
+ "IMPORTANT: Pass confirmation_token='CONFIRM' to execute. " +
97
+ "Requires BUDA_API_KEY and BUDA_API_SECRET.",
98
+ inputSchema: {
99
+ type: "object",
100
+ properties: {
101
+ currency: { type: "string", description: "Currency code (e.g. 'BTC', 'CLP')." },
102
+ amount: { type: "number", description: "Withdrawal amount." },
103
+ address: { type: "string", description: "Destination crypto address. Mutually exclusive with bank_account_id." },
104
+ network: { type: "string", description: "Blockchain network for crypto withdrawals (e.g. 'bitcoin', 'ethereum')." },
105
+ bank_account_id: { type: "number", description: "Fiat bank account ID. Mutually exclusive with address." },
106
+ confirmation_token: {
107
+ type: "string",
108
+ description: "Safety confirmation. Must equal exactly 'CONFIRM' (case-sensitive) to execute.",
109
+ },
110
+ },
111
+ required: ["currency", "amount", "confirmation_token"],
112
+ },
113
+ };
114
+ export async function handleCreateWithdrawal(args, client) {
115
+ const { currency, amount, address, network, bank_account_id, confirmation_token } = args;
116
+ if (confirmation_token !== "CONFIRM") {
117
+ return {
118
+ content: [
119
+ {
120
+ type: "text",
121
+ text: JSON.stringify({
122
+ error: "Withdrawal not created. confirmation_token must equal 'CONFIRM' to execute. " +
123
+ "Review the details and set confirmation_token='CONFIRM' to proceed.",
124
+ code: "CONFIRMATION_REQUIRED",
125
+ preview: { currency, amount, destination: address ?? bank_account_id },
126
+ }),
127
+ },
128
+ ],
129
+ isError: true,
130
+ };
131
+ }
132
+ const hasAddress = address !== undefined;
133
+ const hasBankAccount = bank_account_id !== undefined;
134
+ if (hasAddress && hasBankAccount) {
135
+ return {
136
+ content: [
137
+ {
138
+ type: "text",
139
+ text: JSON.stringify({
140
+ error: "Provide either address (crypto) or bank_account_id (fiat), not both.",
141
+ code: "VALIDATION_ERROR",
142
+ }),
143
+ },
144
+ ],
145
+ isError: true,
146
+ };
147
+ }
148
+ if (!hasAddress && !hasBankAccount) {
149
+ return {
150
+ content: [
151
+ {
152
+ type: "text",
153
+ text: JSON.stringify({
154
+ error: "Either address (crypto) or bank_account_id (fiat) must be provided.",
155
+ code: "VALIDATION_ERROR",
156
+ }),
157
+ },
158
+ ],
159
+ isError: true,
160
+ };
161
+ }
162
+ const validationError = validateCurrency(currency);
163
+ if (validationError) {
164
+ return {
165
+ content: [{ type: "text", text: JSON.stringify({ error: validationError, code: "INVALID_CURRENCY" }) }],
166
+ isError: true,
167
+ };
168
+ }
169
+ try {
170
+ const payload = { amount: String(amount) };
171
+ if (hasAddress) {
172
+ payload.address = address;
173
+ if (network)
174
+ payload.network = network;
175
+ }
176
+ else {
177
+ payload.bank_account_id = bank_account_id;
178
+ }
179
+ const data = await client.post(`/currencies/${currency.toUpperCase()}/withdrawals`, payload);
180
+ return {
181
+ content: [{ type: "text", text: JSON.stringify(normalizeWithdrawal(data.withdrawal), null, 2) }],
182
+ };
183
+ }
184
+ catch (err) {
185
+ const msg = err instanceof BudaApiError
186
+ ? { error: err.message, code: err.status, path: err.path }
187
+ : { error: String(err), code: "UNKNOWN" };
188
+ return {
189
+ content: [{ type: "text", text: JSON.stringify(msg) }],
190
+ isError: true,
191
+ };
192
+ }
193
+ }
194
+ export function register(server, client) {
195
+ server.tool(getWithdrawalHistoryToolSchema.name, getWithdrawalHistoryToolSchema.description, {
196
+ currency: z.string().min(2).max(10).describe("Currency code (e.g. 'BTC', 'CLP')."),
197
+ state: z
198
+ .enum(["pending_signature", "pending", "confirmed", "rejected", "anulled"])
199
+ .optional()
200
+ .describe("Filter by state."),
201
+ per: z.number().int().min(1).max(300).optional().describe("Results per page (default: 20, max: 300)."),
202
+ page: z.number().int().min(1).optional().describe("Page number (default: 1)."),
203
+ }, (args) => handleGetWithdrawalHistory(args, client));
204
+ server.tool(createWithdrawalToolSchema.name, createWithdrawalToolSchema.description, {
205
+ currency: z.string().min(2).max(10).describe("Currency code (e.g. 'BTC', 'CLP')."),
206
+ amount: z.number().positive().describe("Withdrawal amount."),
207
+ address: z.string().optional().describe("Destination crypto address. Mutually exclusive with bank_account_id."),
208
+ network: z.string().optional().describe("Blockchain network for crypto withdrawals (e.g. 'bitcoin', 'ethereum')."),
209
+ bank_account_id: z.number().int().positive().optional().describe("Fiat bank account ID. Mutually exclusive with address."),
210
+ confirmation_token: z
211
+ .string()
212
+ .describe("Safety confirmation. Must equal exactly 'CONFIRM' (case-sensitive) to execute."),
213
+ }, (args) => handleCreateWithdrawal(args, client));
214
+ }
215
+ //# sourceMappingURL=withdrawals.js.map
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
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,MAAM,GAAG,CAA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AAC;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"}
@@ -3,4 +3,9 @@
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;
6
11
  //# sourceMappingURL=validation.d.ts.map
@@ -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"}
@@ -11,4 +11,16 @@ 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
+ }
14
26
  //# sourceMappingURL=validation.js.map
@@ -1,4 +1,4 @@
1
- # Marketplace Submission Assets — v1.4.0
1
+ # Marketplace Submission Assets — v1.5.0
2
2
 
3
3
  Ready-to-use assets for submitting buda-mcp to every major AI marketplace.
4
4
  Replace `gtorreal` / `gtorreal` with your actual handles before submitting.
@@ -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 order management.
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.4.0** adds 5 new tools: `simulate_order`, `calculate_position_size`, `get_market_sentiment`, `get_technical_indicators`, and a dead man's switch (`schedule_cancel_all` + `renew_cancel_timer` + `disarm_cancel_timer`). All response schemas are flat and fully typed.
17
+ **v1.5.0** adds 8 new authenticated tools: `cancel_all_orders`, `cancel_order_by_client_id`, `place_batch_orders`, extended `place_order` (TIF + stop), `create_withdrawal`, `create_fiat_deposit`, `lightning_withdrawal`, and `create_lightning_invoice`. All response schemas are flat and fully typed.
18
18
 
19
19
  ---
20
20
 
@@ -97,6 +97,34 @@ Place a limit or market order. Requires `confirmation_token="CONFIRM"` to preven
97
97
  Cancel an open order by ID. Requires `confirmation_token="CONFIRM"`.
98
98
  **Parameters:** `order_id`, `confirmation_token`.
99
99
 
100
+ ### `cancel_all_orders`
101
+ 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.
102
+ **Parameters:** `market_id` (or `"*"` for all), `confirmation_token`.
103
+
104
+ ### `cancel_order_by_client_id`
105
+ Cancel an open order by its client-assigned string ID. Requires `confirmation_token="CONFIRM"`. Returns the same flat order shape as `get_order`.
106
+ **Parameters:** `client_id`, `confirmation_token`.
107
+
108
+ ### `place_batch_orders`
109
+ 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. Returns `{ results, total, succeeded, failed }`.
110
+ **Parameters:** `orders` (array of 1–20 order objects), `confirmation_token`.
111
+
112
+ ### `create_withdrawal`
113
+ Create a crypto or fiat withdrawal. Exactly one of `address` (crypto) or `bank_account_id` (fiat) must be provided. Requires `confirmation_token="CONFIRM"`.
114
+ **Parameters:** `currency`, `amount`, `address` *(crypto)*, `network` *(optional)*, `bank_account_id` *(fiat)*, `confirmation_token`.
115
+
116
+ ### `create_fiat_deposit`
117
+ Record a fiat deposit. Guard is critical — calling twice creates duplicates. Requires `confirmation_token="CONFIRM"`.
118
+ **Parameters:** `currency`, `amount`, `bank` *(optional)*, `confirmation_token`.
119
+
120
+ ### `lightning_withdrawal`
121
+ Pay a BOLT-11 Lightning invoice from the LN-BTC reserve. Requires `confirmation_token="CONFIRM"`. Returns `{ id, state, amount, fee, payment_hash, created_at }`.
122
+ **Parameters:** `invoice`, `confirmation_token`.
123
+
124
+ ### `create_lightning_invoice`
125
+ Create a Lightning receive invoice. No confirmation required. Returns `{ id, payment_request, amount_satoshis, description, expires_at, state, created_at }`.
126
+ **Parameters:** `amount_satoshis`, `description` *(optional, max 140 chars)*, `expiry_seconds` *(optional, 60–86400)*.
127
+
100
128
  ### `schedule_cancel_all`
101
129
  **WARNING: timer state is lost on server restart. Use only on locally-run instances.**
102
130
  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"`.
@@ -1,5 +1,5 @@
1
1
  {
2
- "_comment": "Gemini function declarations for buda-mcp v1.4.0. Pass this array as the `tools[0].functionDeclarations` field when calling the Gemini API. See: https://ai.google.dev/gemini-api/docs/function-calling",
2
+ "_comment": "Gemini function declarations for buda-mcp v1.5.0. Pass this array as the `tools[0].functionDeclarations` field when calling the Gemini API. See: https://ai.google.dev/gemini-api/docs/function-calling",
3
3
  "functionDeclarations": [
4
4
  {
5
5
  "name": "get_markets",
@@ -393,6 +393,160 @@
393
393
  },
394
394
  "required": ["order_id", "confirmation_token"]
395
395
  }
396
+ },
397
+ {
398
+ "name": "cancel_all_orders",
399
+ "description": "Cancels all open orders on Buda.com, optionally filtered by market. Pass market_id='*' to cancel across all markets. IMPORTANT: Requires confirmation_token='CONFIRM'. Auth-gated.",
400
+ "parameters": {
401
+ "type": "OBJECT",
402
+ "properties": {
403
+ "market_id": {
404
+ "type": "STRING",
405
+ "description": "Market ID (e.g. 'BTC-CLP') or '*' to cancel orders across all markets."
406
+ },
407
+ "confirmation_token": {
408
+ "type": "STRING",
409
+ "description": "Safety confirmation. Must equal exactly 'CONFIRM' (case-sensitive) to execute."
410
+ }
411
+ },
412
+ "required": ["market_id", "confirmation_token"]
413
+ }
414
+ },
415
+ {
416
+ "name": "cancel_order_by_client_id",
417
+ "description": "Cancels an open order by its client-assigned string ID on Buda.com. IMPORTANT: Requires confirmation_token='CONFIRM'. Auth-gated.",
418
+ "parameters": {
419
+ "type": "OBJECT",
420
+ "properties": {
421
+ "client_id": {
422
+ "type": "STRING",
423
+ "description": "The client ID string assigned when placing the order."
424
+ },
425
+ "confirmation_token": {
426
+ "type": "STRING",
427
+ "description": "Safety confirmation. Must equal exactly 'CONFIRM' (case-sensitive) to execute."
428
+ }
429
+ },
430
+ "required": ["client_id", "confirmation_token"]
431
+ }
432
+ },
433
+ {
434
+ "name": "place_batch_orders",
435
+ "description": "Places up to 20 orders sequentially on Buda.com. All orders are pre-validated before any API call. Partial failures do not roll back placed orders. IMPORTANT: Requires confirmation_token='CONFIRM'. Auth-gated.",
436
+ "parameters": {
437
+ "type": "OBJECT",
438
+ "properties": {
439
+ "orders": {
440
+ "type": "ARRAY",
441
+ "description": "Array of 1–20 orders to place. Each order: market_id, type (Bid/Ask), price_type (limit/market), amount, optional limit_price."
442
+ },
443
+ "confirmation_token": {
444
+ "type": "STRING",
445
+ "description": "Safety confirmation. Must equal exactly 'CONFIRM' (case-sensitive) to execute."
446
+ }
447
+ },
448
+ "required": ["orders", "confirmation_token"]
449
+ }
450
+ },
451
+ {
452
+ "name": "create_withdrawal",
453
+ "description": "Creates a crypto or fiat withdrawal on Buda.com. Exactly one of address (crypto) or bank_account_id (fiat) must be provided. IMPORTANT: Requires confirmation_token='CONFIRM'. Auth-gated.",
454
+ "parameters": {
455
+ "type": "OBJECT",
456
+ "properties": {
457
+ "currency": {
458
+ "type": "STRING",
459
+ "description": "Currency code (e.g. 'BTC', 'CLP')."
460
+ },
461
+ "amount": {
462
+ "type": "NUMBER",
463
+ "description": "Withdrawal amount."
464
+ },
465
+ "address": {
466
+ "type": "STRING",
467
+ "description": "Destination crypto address. Mutually exclusive with bank_account_id."
468
+ },
469
+ "network": {
470
+ "type": "STRING",
471
+ "description": "Blockchain network (e.g. 'bitcoin', 'ethereum'). Optional."
472
+ },
473
+ "bank_account_id": {
474
+ "type": "INTEGER",
475
+ "description": "Fiat bank account ID. Mutually exclusive with address."
476
+ },
477
+ "confirmation_token": {
478
+ "type": "STRING",
479
+ "description": "Safety confirmation. Must equal exactly 'CONFIRM' (case-sensitive) to execute."
480
+ }
481
+ },
482
+ "required": ["currency", "amount", "confirmation_token"]
483
+ }
484
+ },
485
+ {
486
+ "name": "create_fiat_deposit",
487
+ "description": "Records a fiat deposit on Buda.com. IMPORTANT: Calling twice creates duplicate records. Requires confirmation_token='CONFIRM'. Auth-gated.",
488
+ "parameters": {
489
+ "type": "OBJECT",
490
+ "properties": {
491
+ "currency": {
492
+ "type": "STRING",
493
+ "description": "Fiat currency code (e.g. 'CLP', 'COP', 'PEN')."
494
+ },
495
+ "amount": {
496
+ "type": "NUMBER",
497
+ "description": "Deposit amount."
498
+ },
499
+ "bank": {
500
+ "type": "STRING",
501
+ "description": "Bank name or identifier for the deposit source. Optional."
502
+ },
503
+ "confirmation_token": {
504
+ "type": "STRING",
505
+ "description": "Safety confirmation. Must equal exactly 'CONFIRM' (case-sensitive) to execute."
506
+ }
507
+ },
508
+ "required": ["currency", "amount", "confirmation_token"]
509
+ }
510
+ },
511
+ {
512
+ "name": "lightning_withdrawal",
513
+ "description": "Pays a Bitcoin Lightning Network BOLT-11 invoice from the Buda.com LN-BTC reserve. Funds leave immediately on success. IMPORTANT: Requires confirmation_token='CONFIRM'. Auth-gated.",
514
+ "parameters": {
515
+ "type": "OBJECT",
516
+ "properties": {
517
+ "invoice": {
518
+ "type": "STRING",
519
+ "description": "BOLT-11 Lightning invoice string (starts with 'lnbc', 'lntb', etc.)."
520
+ },
521
+ "confirmation_token": {
522
+ "type": "STRING",
523
+ "description": "Safety confirmation. Must equal exactly 'CONFIRM' (case-sensitive) to execute."
524
+ }
525
+ },
526
+ "required": ["invoice", "confirmation_token"]
527
+ }
528
+ },
529
+ {
530
+ "name": "create_lightning_invoice",
531
+ "description": "Creates a Bitcoin Lightning Network receive invoice on Buda.com. No confirmation required — no funds leave the account. Auth-gated.",
532
+ "parameters": {
533
+ "type": "OBJECT",
534
+ "properties": {
535
+ "amount_satoshis": {
536
+ "type": "INTEGER",
537
+ "description": "Invoice amount in satoshis (positive integer)."
538
+ },
539
+ "description": {
540
+ "type": "STRING",
541
+ "description": "Optional payment description (max 140 characters)."
542
+ },
543
+ "expiry_seconds": {
544
+ "type": "INTEGER",
545
+ "description": "Invoice expiry in seconds (60–86400). Default: 3600."
546
+ }
547
+ },
548
+ "required": ["amount_satoshis"]
549
+ }
396
550
  }
397
551
  ]
398
552
  }
@@ -14,7 +14,7 @@ info:
14
14
  stdio server. Deploy locally with mcp-proxy:
15
15
  mcp-proxy --port 8000 -- npx -y @guiie/buda-mcp
16
16
  Or point `servers[0].url` at your hosted instance.
17
- version: 1.4.1
17
+ version: 1.5.0
18
18
  contact:
19
19
  url: https://github.com/gtorreal/buda-mcp
20
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guiie/buda-mcp",
3
- "version": "1.4.2",
3
+ "version": "1.5.0",
4
4
  "mcpName": "io.github.gtorreal/buda-mcp",
5
5
  "description": "MCP server for Buda.com's public cryptocurrency exchange API (Chile, Colombia, Peru)",
6
6
  "type": "module",