@guiie/buda-mcp 1.5.0 → 1.5.2
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 +75 -0
- package/PUBLISH_CHECKLIST.md +48 -89
- package/README.md +446 -78
- package/dist/audit.d.ts +21 -0
- package/dist/audit.d.ts.map +1 -0
- package/dist/audit.js +14 -0
- package/dist/client.d.ts +1 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +2 -1
- package/dist/http.js +65 -7
- package/dist/index.js +12 -3
- package/dist/tools/account.js +1 -1
- package/dist/tools/arbitrage.js +1 -1
- package/dist/tools/balance.js +1 -1
- package/dist/tools/balances.js +1 -1
- package/dist/tools/banks.js +1 -1
- package/dist/tools/batch_orders.d.ts +6 -1
- package/dist/tools/batch_orders.d.ts.map +1 -1
- package/dist/tools/batch_orders.js +47 -3
- package/dist/tools/cancel_all_orders.d.ts +1 -1
- package/dist/tools/cancel_all_orders.d.ts.map +1 -1
- package/dist/tools/cancel_all_orders.js +10 -13
- package/dist/tools/cancel_order.d.ts +1 -1
- package/dist/tools/cancel_order.d.ts.map +1 -1
- package/dist/tools/cancel_order.js +10 -10
- package/dist/tools/cancel_order_by_client_id.d.ts +1 -1
- package/dist/tools/cancel_order_by_client_id.d.ts.map +1 -1
- package/dist/tools/cancel_order_by_client_id.js +9 -9
- package/dist/tools/compare_markets.d.ts +9 -0
- package/dist/tools/compare_markets.d.ts.map +1 -1
- package/dist/tools/compare_markets.js +63 -53
- package/dist/tools/dead_mans_switch.d.ts +2 -2
- package/dist/tools/dead_mans_switch.d.ts.map +1 -1
- package/dist/tools/dead_mans_switch.js +68 -6
- package/dist/tools/deposits.js +2 -2
- package/dist/tools/fees.js +1 -1
- package/dist/tools/lightning.d.ts +1 -1
- package/dist/tools/lightning.d.ts.map +1 -1
- package/dist/tools/lightning.js +25 -9
- package/dist/tools/market_sentiment.js +1 -1
- package/dist/tools/market_summary.js +1 -1
- package/dist/tools/markets.js +1 -1
- package/dist/tools/order_lookup.js +2 -2
- package/dist/tools/orderbook.js +1 -1
- package/dist/tools/orders.js +1 -1
- package/dist/tools/place_order.d.ts +1 -1
- package/dist/tools/place_order.d.ts.map +1 -1
- package/dist/tools/place_order.js +53 -4
- package/dist/tools/price_history.js +1 -1
- package/dist/tools/quotation.js +1 -1
- package/dist/tools/receive_addresses.d.ts +6 -1
- package/dist/tools/receive_addresses.d.ts.map +1 -1
- package/dist/tools/receive_addresses.js +37 -13
- package/dist/tools/remittance_recipients.js +2 -2
- package/dist/tools/remittances.d.ts +7 -2
- package/dist/tools/remittances.d.ts.map +1 -1
- package/dist/tools/remittances.js +46 -23
- package/dist/tools/simulate_order.js +1 -1
- package/dist/tools/spread.js +1 -1
- package/dist/tools/technical_indicators.d.ts.map +1 -1
- package/dist/tools/technical_indicators.js +3 -2
- package/dist/tools/ticker.js +1 -1
- package/dist/tools/trades.js +1 -1
- package/dist/tools/volume.js +1 -1
- package/dist/tools/withdrawals.d.ts +1 -1
- package/dist/tools/withdrawals.d.ts.map +1 -1
- package/dist/tools/withdrawals.js +21 -11
- package/dist/utils.d.ts +10 -0
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +29 -1
- package/dist/validation.d.ts +6 -0
- package/dist/validation.d.ts.map +1 -1
- package/dist/validation.js +26 -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 +75 -4
- package/marketplace/gemini-tools.json +325 -2
- package/marketplace/openapi.yaml +160 -1
- package/package.json +2 -1
- package/server.json +2 -2
- package/src/audit.ts +24 -0
- package/src/client.ts +3 -1
- package/src/http.ts +75 -7
- package/src/index.ts +10 -3
- package/src/tools/account.ts +1 -1
- package/src/tools/arbitrage.ts +1 -1
- package/src/tools/balance.ts +1 -1
- package/src/tools/balances.ts +1 -1
- package/src/tools/banks.ts +1 -1
- package/src/tools/batch_orders.ts +52 -2
- package/src/tools/cancel_all_orders.ts +10 -12
- package/src/tools/cancel_order.ts +10 -9
- package/src/tools/cancel_order_by_client_id.ts +9 -8
- package/src/tools/compare_markets.ts +78 -61
- package/src/tools/dead_mans_switch.ts +76 -5
- package/src/tools/deposits.ts +2 -2
- package/src/tools/fees.ts +1 -1
- package/src/tools/lightning.ts +28 -9
- package/src/tools/market_sentiment.ts +1 -1
- package/src/tools/market_summary.ts +1 -1
- package/src/tools/markets.ts +1 -1
- package/src/tools/order_lookup.ts +2 -2
- package/src/tools/orderbook.ts +1 -1
- package/src/tools/orders.ts +1 -1
- package/src/tools/place_order.ts +56 -5
- package/src/tools/price_history.ts +1 -1
- package/src/tools/quotation.ts +1 -1
- package/src/tools/receive_addresses.ts +40 -13
- package/src/tools/remittance_recipients.ts +2 -2
- package/src/tools/remittances.ts +49 -22
- package/src/tools/simulate_order.ts +1 -1
- package/src/tools/spread.ts +1 -1
- package/src/tools/technical_indicators.ts +3 -2
- package/src/tools/ticker.ts +1 -1
- package/src/tools/trades.ts +1 -1
- package/src/tools/volume.ts +1 -1
- package/src/tools/withdrawals.ts +22 -10
- package/src/utils.ts +36 -1
- package/src/validation.ts +29 -0
- package/src/version.ts +11 -3
- package/test/unit.ts +623 -22
|
@@ -14,7 +14,7 @@ Real-time market data from [Buda.com](https://www.buda.com/), the leading crypto
|
|
|
14
14
|
|
|
15
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.5.
|
|
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)*.
|
|
@@ -105,14 +120,34 @@ Cancel all open orders in a specific market or across all markets (`market_id="*
|
|
|
105
120
|
Cancel an open order by its client-assigned string ID. Requires `confirmation_token="CONFIRM"`. Returns the same flat order shape as `get_order`.
|
|
106
121
|
**Parameters:** `client_id`, `confirmation_token`.
|
|
107
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
|
+
|
|
108
131
|
### `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`.
|
|
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)*.
|
|
111
142
|
|
|
112
143
|
### `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"`.
|
|
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"`.
|
|
114
145
|
**Parameters:** `currency`, `amount`, `address` *(crypto)*, `network` *(optional)*, `bank_account_id` *(fiat)*, `confirmation_token`.
|
|
115
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
|
+
|
|
116
151
|
### `create_fiat_deposit`
|
|
117
152
|
Record a fiat deposit. Guard is critical — calling twice creates duplicates. Requires `confirmation_token="CONFIRM"`.
|
|
118
153
|
**Parameters:** `currency`, `amount`, `bank` *(optional)*, `confirmation_token`.
|
|
@@ -125,6 +160,42 @@ Pay a BOLT-11 Lightning invoice from the LN-BTC reserve. Requires `confirmation_
|
|
|
125
160
|
Create a Lightning receive invoice. No confirmation required. Returns `{ id, payment_request, amount_satoshis, description, expires_at, state, created_at }`.
|
|
126
161
|
**Parameters:** `amount_satoshis`, `description` *(optional, max 140 chars)*, `expiry_seconds` *(optional, 60–86400)*.
|
|
127
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
|
+
|
|
128
199
|
### `schedule_cancel_all`
|
|
129
200
|
**WARNING: timer state is lost on server restart. Use only on locally-run instances.**
|
|
130
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"`.
|
|
@@ -307,6 +307,325 @@
|
|
|
307
307
|
"required": ["market_id"]
|
|
308
308
|
}
|
|
309
309
|
},
|
|
310
|
+
{
|
|
311
|
+
"name": "get_available_banks",
|
|
312
|
+
"description": "Returns banks available for deposits and withdrawals for a given fiat currency as an array of {id, name, country} objects. Returns an empty array if none are available. Cached 60s. Example: 'Which banks can I use to deposit CLP on Buda?'",
|
|
313
|
+
"parameters": {
|
|
314
|
+
"type": "OBJECT",
|
|
315
|
+
"properties": {
|
|
316
|
+
"currency": {
|
|
317
|
+
"type": "STRING",
|
|
318
|
+
"description": "Fiat currency code (e.g. 'CLP', 'COP', 'PEN'). Case-insensitive."
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
"required": ["currency"]
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"name": "get_real_quotation",
|
|
326
|
+
"description": "Server-side buy or sell quotation from Buda using the live order book. Returns exact fill price, total cost with fees, and applied fee rate. Does not place an order. Example: 'What would it cost to buy 0.1 BTC on BTC-CLP right now including fees?'",
|
|
327
|
+
"parameters": {
|
|
328
|
+
"type": "OBJECT",
|
|
329
|
+
"properties": {
|
|
330
|
+
"market_id": {
|
|
331
|
+
"type": "STRING",
|
|
332
|
+
"description": "Market identifier (e.g. 'BTC-CLP', 'ETH-BTC'). Case-insensitive."
|
|
333
|
+
},
|
|
334
|
+
"type": {
|
|
335
|
+
"type": "STRING",
|
|
336
|
+
"description": "Order side: 'Bid' to buy base currency, 'Ask' to sell base currency."
|
|
337
|
+
},
|
|
338
|
+
"amount": {
|
|
339
|
+
"type": "NUMBER",
|
|
340
|
+
"description": "Order size in the base currency (e.g. BTC for BTC-CLP)."
|
|
341
|
+
},
|
|
342
|
+
"limit": {
|
|
343
|
+
"type": "NUMBER",
|
|
344
|
+
"description": "Optional limit price in quote currency."
|
|
345
|
+
}
|
|
346
|
+
},
|
|
347
|
+
"required": ["market_id", "type", "amount"]
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
"name": "get_account_info",
|
|
352
|
+
"description": "Returns the authenticated user's profile on Buda.com: email, display name, pubsub key, and monthly transacted amounts. Read-only. Requires BUDA_API_KEY and BUDA_API_SECRET. Auth-gated.",
|
|
353
|
+
"parameters": {
|
|
354
|
+
"type": "OBJECT",
|
|
355
|
+
"properties": {},
|
|
356
|
+
"required": []
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"name": "get_balance",
|
|
361
|
+
"description": "Returns the balance for a single currency for the authenticated Buda.com account as a flat typed object. Includes total, available, frozen, and pending withdrawal amounts as floats with separate _currency fields. More efficient than get_balances when only one currency is needed. Requires BUDA_API_KEY and BUDA_API_SECRET. Auth-gated. Example: 'How much ETH do I have available?'",
|
|
362
|
+
"parameters": {
|
|
363
|
+
"type": "OBJECT",
|
|
364
|
+
"properties": {
|
|
365
|
+
"currency": {
|
|
366
|
+
"type": "STRING",
|
|
367
|
+
"description": "Currency code (e.g. 'BTC', 'ETH', 'CLP', 'USDC'). Case-insensitive."
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
"required": ["currency"]
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
"name": "get_order",
|
|
375
|
+
"description": "Fetch a single order by its numeric ID with full detail. All monetary amounts are floats with separate _currency fields. Requires BUDA_API_KEY and BUDA_API_SECRET. Auth-gated. Example: 'What is the status of order 12345?'",
|
|
376
|
+
"parameters": {
|
|
377
|
+
"type": "OBJECT",
|
|
378
|
+
"properties": {
|
|
379
|
+
"order_id": {
|
|
380
|
+
"type": "INTEGER",
|
|
381
|
+
"description": "Numeric order ID."
|
|
382
|
+
}
|
|
383
|
+
},
|
|
384
|
+
"required": ["order_id"]
|
|
385
|
+
}
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
"name": "get_order_by_client_id",
|
|
389
|
+
"description": "Fetch a single order by the client-assigned string ID set at placement time. All monetary amounts are floats with _currency fields. Requires BUDA_API_KEY and BUDA_API_SECRET. Auth-gated.",
|
|
390
|
+
"parameters": {
|
|
391
|
+
"type": "OBJECT",
|
|
392
|
+
"properties": {
|
|
393
|
+
"client_id": {
|
|
394
|
+
"type": "STRING",
|
|
395
|
+
"description": "Client-assigned string ID used when placing the order."
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
"required": ["client_id"]
|
|
399
|
+
}
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
"name": "get_network_fees",
|
|
403
|
+
"description": "Returns the deposit or withdrawal fee schedule for a given currency: fee name, flat amount, minimum, maximum, and percentage flag. Useful before initiating a withdrawal. Requires BUDA_API_KEY and BUDA_API_SECRET. Auth-gated. Example: 'What is the fee to withdraw ETH from Buda?'",
|
|
404
|
+
"parameters": {
|
|
405
|
+
"type": "OBJECT",
|
|
406
|
+
"properties": {
|
|
407
|
+
"currency": {
|
|
408
|
+
"type": "STRING",
|
|
409
|
+
"description": "Currency code (e.g. 'BTC', 'ETH', 'CLP'). Case-insensitive."
|
|
410
|
+
},
|
|
411
|
+
"type": {
|
|
412
|
+
"type": "STRING",
|
|
413
|
+
"description": "Fee direction: 'deposit' or 'withdrawal'."
|
|
414
|
+
}
|
|
415
|
+
},
|
|
416
|
+
"required": ["currency", "type"]
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
"name": "get_deposit_history",
|
|
421
|
+
"description": "Deposit history for a currency, optionally filtered by state and paginated. Amounts are floats with _currency fields. Requires BUDA_API_KEY and BUDA_API_SECRET. Auth-gated. Example: 'Show my confirmed BTC deposits.'",
|
|
422
|
+
"parameters": {
|
|
423
|
+
"type": "OBJECT",
|
|
424
|
+
"properties": {
|
|
425
|
+
"currency": {
|
|
426
|
+
"type": "STRING",
|
|
427
|
+
"description": "Currency code (e.g. 'BTC', 'CLP'). Case-insensitive."
|
|
428
|
+
},
|
|
429
|
+
"state": {
|
|
430
|
+
"type": "STRING",
|
|
431
|
+
"description": "Filter by state: 'pending_info', 'pending', 'confirmed', 'anulled', 'retained'. Omit to return all."
|
|
432
|
+
},
|
|
433
|
+
"per": {
|
|
434
|
+
"type": "INTEGER",
|
|
435
|
+
"description": "Results per page (default 20, max 300)."
|
|
436
|
+
},
|
|
437
|
+
"page": {
|
|
438
|
+
"type": "INTEGER",
|
|
439
|
+
"description": "Page number (default 1)."
|
|
440
|
+
}
|
|
441
|
+
},
|
|
442
|
+
"required": ["currency"]
|
|
443
|
+
}
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
"name": "get_withdrawal_history",
|
|
447
|
+
"description": "Withdrawal history for a currency, optionally filtered by state and paginated. Amounts are floats with _currency fields. Requires BUDA_API_KEY and BUDA_API_SECRET. Auth-gated. Example: 'Show my pending BTC withdrawals.'",
|
|
448
|
+
"parameters": {
|
|
449
|
+
"type": "OBJECT",
|
|
450
|
+
"properties": {
|
|
451
|
+
"currency": {
|
|
452
|
+
"type": "STRING",
|
|
453
|
+
"description": "Currency code (e.g. 'BTC', 'CLP'). Case-insensitive."
|
|
454
|
+
},
|
|
455
|
+
"state": {
|
|
456
|
+
"type": "STRING",
|
|
457
|
+
"description": "Filter by state: 'pending_signature', 'pending', 'confirmed', 'rejected', 'anulled'. Omit to return all."
|
|
458
|
+
},
|
|
459
|
+
"per": {
|
|
460
|
+
"type": "INTEGER",
|
|
461
|
+
"description": "Results per page (default 20, max 300)."
|
|
462
|
+
},
|
|
463
|
+
"page": {
|
|
464
|
+
"type": "INTEGER",
|
|
465
|
+
"description": "Page number (default 1)."
|
|
466
|
+
}
|
|
467
|
+
},
|
|
468
|
+
"required": ["currency"]
|
|
469
|
+
}
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
"name": "create_receive_address",
|
|
473
|
+
"description": "Generate a new crypto deposit (receive) address for a currency. Not idempotent — each call creates a new address. Crypto only. IMPORTANT: Requires confirmation_token='CONFIRM'. Requires BUDA_API_KEY and BUDA_API_SECRET. Auth-gated.",
|
|
474
|
+
"parameters": {
|
|
475
|
+
"type": "OBJECT",
|
|
476
|
+
"properties": {
|
|
477
|
+
"currency": {
|
|
478
|
+
"type": "STRING",
|
|
479
|
+
"description": "Crypto currency code (e.g. 'BTC', 'ETH'). Case-insensitive."
|
|
480
|
+
},
|
|
481
|
+
"confirmation_token": {
|
|
482
|
+
"type": "STRING",
|
|
483
|
+
"description": "Must equal exactly 'CONFIRM' (case-sensitive) to generate a new address."
|
|
484
|
+
}
|
|
485
|
+
},
|
|
486
|
+
"required": ["currency", "confirmation_token"]
|
|
487
|
+
}
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
"name": "list_receive_addresses",
|
|
491
|
+
"description": "List all receive (deposit) addresses for a currency. Requires BUDA_API_KEY and BUDA_API_SECRET. Auth-gated.",
|
|
492
|
+
"parameters": {
|
|
493
|
+
"type": "OBJECT",
|
|
494
|
+
"properties": {
|
|
495
|
+
"currency": {
|
|
496
|
+
"type": "STRING",
|
|
497
|
+
"description": "Crypto currency code (e.g. 'BTC', 'ETH'). Case-insensitive."
|
|
498
|
+
}
|
|
499
|
+
},
|
|
500
|
+
"required": ["currency"]
|
|
501
|
+
}
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
"name": "get_receive_address",
|
|
505
|
+
"description": "Fetch a specific receive (deposit) address by its numeric ID. Requires BUDA_API_KEY and BUDA_API_SECRET. Auth-gated.",
|
|
506
|
+
"parameters": {
|
|
507
|
+
"type": "OBJECT",
|
|
508
|
+
"properties": {
|
|
509
|
+
"currency": {
|
|
510
|
+
"type": "STRING",
|
|
511
|
+
"description": "Crypto currency code (e.g. 'BTC', 'ETH'). Case-insensitive."
|
|
512
|
+
},
|
|
513
|
+
"id": {
|
|
514
|
+
"type": "INTEGER",
|
|
515
|
+
"description": "Numeric receive address ID."
|
|
516
|
+
}
|
|
517
|
+
},
|
|
518
|
+
"required": ["currency", "id"]
|
|
519
|
+
}
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
"name": "list_remittance_recipients",
|
|
523
|
+
"description": "List saved remittance recipients (bank accounts) for fiat transfers, with optional pagination. Requires BUDA_API_KEY and BUDA_API_SECRET. Auth-gated.",
|
|
524
|
+
"parameters": {
|
|
525
|
+
"type": "OBJECT",
|
|
526
|
+
"properties": {
|
|
527
|
+
"per": {
|
|
528
|
+
"type": "INTEGER",
|
|
529
|
+
"description": "Results per page (default 20, max 300)."
|
|
530
|
+
},
|
|
531
|
+
"page": {
|
|
532
|
+
"type": "INTEGER",
|
|
533
|
+
"description": "Page number (default 1)."
|
|
534
|
+
}
|
|
535
|
+
},
|
|
536
|
+
"required": []
|
|
537
|
+
}
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
"name": "get_remittance_recipient",
|
|
541
|
+
"description": "Fetch a single saved remittance recipient by ID. Requires BUDA_API_KEY and BUDA_API_SECRET. Auth-gated.",
|
|
542
|
+
"parameters": {
|
|
543
|
+
"type": "OBJECT",
|
|
544
|
+
"properties": {
|
|
545
|
+
"id": {
|
|
546
|
+
"type": "INTEGER",
|
|
547
|
+
"description": "Numeric recipient ID."
|
|
548
|
+
}
|
|
549
|
+
},
|
|
550
|
+
"required": ["id"]
|
|
551
|
+
}
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
"name": "list_remittances",
|
|
555
|
+
"description": "List past fiat remittance transfers with optional pagination. Amounts are floats with _currency fields. Requires BUDA_API_KEY and BUDA_API_SECRET. Auth-gated.",
|
|
556
|
+
"parameters": {
|
|
557
|
+
"type": "OBJECT",
|
|
558
|
+
"properties": {
|
|
559
|
+
"per": {
|
|
560
|
+
"type": "INTEGER",
|
|
561
|
+
"description": "Results per page (default 20, max 300)."
|
|
562
|
+
},
|
|
563
|
+
"page": {
|
|
564
|
+
"type": "INTEGER",
|
|
565
|
+
"description": "Page number (default 1)."
|
|
566
|
+
}
|
|
567
|
+
},
|
|
568
|
+
"required": []
|
|
569
|
+
}
|
|
570
|
+
},
|
|
571
|
+
{
|
|
572
|
+
"name": "quote_remittance",
|
|
573
|
+
"description": "Create a time-limited remittance quote using the live FX rate. Does not transfer funds. Follow with accept_remittance_quote to execute. Not idempotent — each call creates a new remittance record. IMPORTANT: Requires confirmation_token='CONFIRM'. Requires BUDA_API_KEY and BUDA_API_SECRET. Auth-gated.",
|
|
574
|
+
"parameters": {
|
|
575
|
+
"type": "OBJECT",
|
|
576
|
+
"properties": {
|
|
577
|
+
"currency": {
|
|
578
|
+
"type": "STRING",
|
|
579
|
+
"description": "Fiat currency to remit (e.g. 'CLP', 'COP', 'PEN')."
|
|
580
|
+
},
|
|
581
|
+
"amount": {
|
|
582
|
+
"type": "NUMBER",
|
|
583
|
+
"description": "Amount to remit (positive number)."
|
|
584
|
+
},
|
|
585
|
+
"recipient_id": {
|
|
586
|
+
"type": "INTEGER",
|
|
587
|
+
"description": "Saved remittance recipient ID."
|
|
588
|
+
},
|
|
589
|
+
"confirmation_token": {
|
|
590
|
+
"type": "STRING",
|
|
591
|
+
"description": "Must equal exactly 'CONFIRM' (case-sensitive) to create the quote."
|
|
592
|
+
}
|
|
593
|
+
},
|
|
594
|
+
"required": ["currency", "amount", "recipient_id", "confirmation_token"]
|
|
595
|
+
}
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
"name": "accept_remittance_quote",
|
|
599
|
+
"description": "Accept and execute a previously quoted remittance. IMPORTANT: Irreversible — funds are transferred immediately. Requires confirmation_token='CONFIRM'. Requires BUDA_API_KEY and BUDA_API_SECRET. Auth-gated.",
|
|
600
|
+
"parameters": {
|
|
601
|
+
"type": "OBJECT",
|
|
602
|
+
"properties": {
|
|
603
|
+
"id": {
|
|
604
|
+
"type": "INTEGER",
|
|
605
|
+
"description": "Remittance quote ID to accept."
|
|
606
|
+
},
|
|
607
|
+
"confirmation_token": {
|
|
608
|
+
"type": "STRING",
|
|
609
|
+
"description": "Must equal exactly 'CONFIRM' (case-sensitive) to execute the remittance."
|
|
610
|
+
}
|
|
611
|
+
},
|
|
612
|
+
"required": ["id", "confirmation_token"]
|
|
613
|
+
}
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
"name": "get_remittance",
|
|
617
|
+
"description": "Fetch the status and details of a single remittance by ID. Amounts are floats with _currency fields. Requires BUDA_API_KEY and BUDA_API_SECRET. Auth-gated.",
|
|
618
|
+
"parameters": {
|
|
619
|
+
"type": "OBJECT",
|
|
620
|
+
"properties": {
|
|
621
|
+
"id": {
|
|
622
|
+
"type": "INTEGER",
|
|
623
|
+
"description": "Remittance ID."
|
|
624
|
+
}
|
|
625
|
+
},
|
|
626
|
+
"required": ["id"]
|
|
627
|
+
}
|
|
628
|
+
},
|
|
310
629
|
{
|
|
311
630
|
"name": "get_balances",
|
|
312
631
|
"description": "Returns all currency balances for the authenticated Buda.com account as flat typed objects. Each currency entry includes total amount, available amount (not frozen), frozen amount, and pending withdrawal amount — all as floats with separate _currency fields. Requires BUDA_API_KEY and BUDA_API_SECRET. Auth-gated. Example: 'How much BTC do I have available to trade right now?'",
|
|
@@ -432,7 +751,7 @@
|
|
|
432
751
|
},
|
|
433
752
|
{
|
|
434
753
|
"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.",
|
|
754
|
+
"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. Use max_notional to cap total exposure (sum of amount x limit_price for limit orders; market orders contribute 0). IMPORTANT: Requires confirmation_token='CONFIRM'. Auth-gated.",
|
|
436
755
|
"parameters": {
|
|
437
756
|
"type": "OBJECT",
|
|
438
757
|
"properties": {
|
|
@@ -440,6 +759,10 @@
|
|
|
440
759
|
"type": "ARRAY",
|
|
441
760
|
"description": "Array of 1–20 orders to place. Each order: market_id, type (Bid/Ask), price_type (limit/market), amount, optional limit_price."
|
|
442
761
|
},
|
|
762
|
+
"max_notional": {
|
|
763
|
+
"type": "NUMBER",
|
|
764
|
+
"description": "Optional spending cap: total notional (sum of amount x limit_price for limit orders). Batch is rejected before any API call if exceeded. Market orders contribute 0."
|
|
765
|
+
},
|
|
443
766
|
"confirmation_token": {
|
|
444
767
|
"type": "STRING",
|
|
445
768
|
"description": "Safety confirmation. Must equal exactly 'CONFIRM' (case-sensitive) to execute."
|
|
@@ -450,7 +773,7 @@
|
|
|
450
773
|
},
|
|
451
774
|
{
|
|
452
775
|
"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.",
|
|
776
|
+
"description": "Creates a crypto or fiat withdrawal on Buda.com. Exactly one of address (crypto) or bank_account_id (fiat) must be provided. WARNING: Crypto withdrawals are irreversible — verify the destination address carefully. IMPORTANT: Requires confirmation_token='CONFIRM'. Auth-gated.",
|
|
454
777
|
"parameters": {
|
|
455
778
|
"type": "OBJECT",
|
|
456
779
|
"properties": {
|
package/marketplace/openapi.yaml
CHANGED
|
@@ -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.5.
|
|
17
|
+
version: 1.5.1
|
|
18
18
|
contact:
|
|
19
19
|
url: https://github.com/gtorreal/buda-mcp
|
|
20
20
|
|
|
@@ -488,6 +488,77 @@ paths:
|
|
|
488
488
|
"404":
|
|
489
489
|
$ref: "#/components/responses/NotFound"
|
|
490
490
|
|
|
491
|
+
/get_available_banks:
|
|
492
|
+
get:
|
|
493
|
+
operationId: getAvailableBanks
|
|
494
|
+
summary: Banks available for deposits and withdrawals of a fiat currency
|
|
495
|
+
description: |
|
|
496
|
+
Returns banks available for deposits and withdrawals of a given fiat currency on Buda.com.
|
|
497
|
+
Returns an empty banks array (not an error) if the currency has no associated banks
|
|
498
|
+
(e.g. crypto currencies or unsupported fiat currencies). Results are cached for 60 seconds.
|
|
499
|
+
Example: 'Which banks can I use for CLP deposits?'
|
|
500
|
+
parameters:
|
|
501
|
+
- name: currency
|
|
502
|
+
in: query
|
|
503
|
+
required: true
|
|
504
|
+
description: Fiat currency code (e.g. "CLP", "COP", "PEN"). Case-insensitive.
|
|
505
|
+
schema:
|
|
506
|
+
type: string
|
|
507
|
+
example: CLP
|
|
508
|
+
responses:
|
|
509
|
+
"200":
|
|
510
|
+
description: Available banks for the currency
|
|
511
|
+
content:
|
|
512
|
+
application/json:
|
|
513
|
+
schema:
|
|
514
|
+
$ref: "#/components/schemas/AvailableBanksResponse"
|
|
515
|
+
"404":
|
|
516
|
+
$ref: "#/components/responses/NotFound"
|
|
517
|
+
|
|
518
|
+
/get_real_quotation:
|
|
519
|
+
post:
|
|
520
|
+
operationId: getRealQuotation
|
|
521
|
+
summary: Server-side price quotation for a buy or sell
|
|
522
|
+
description: |
|
|
523
|
+
Calls the Buda quotation API to compute an accurate fill estimate including fees,
|
|
524
|
+
based on live order book state. Prefer this over simulate_order for accurate fee-tier-aware quotes.
|
|
525
|
+
This is a POST but does not place an order. Public endpoint — no API key required.
|
|
526
|
+
Example: 'Get an accurate quote to sell 0.05 BTC on BTC-CLP.'
|
|
527
|
+
requestBody:
|
|
528
|
+
required: true
|
|
529
|
+
content:
|
|
530
|
+
application/json:
|
|
531
|
+
schema:
|
|
532
|
+
type: object
|
|
533
|
+
required: [market_id, type, amount]
|
|
534
|
+
properties:
|
|
535
|
+
market_id:
|
|
536
|
+
type: string
|
|
537
|
+
description: Market identifier (e.g. "BTC-CLP", "ETH-BTC"). Case-insensitive.
|
|
538
|
+
example: BTC-CLP
|
|
539
|
+
type:
|
|
540
|
+
type: string
|
|
541
|
+
enum: [Bid, Ask]
|
|
542
|
+
description: "'Bid' to buy base currency, 'Ask' to sell base currency."
|
|
543
|
+
amount:
|
|
544
|
+
type: number
|
|
545
|
+
minimum: 0
|
|
546
|
+
description: Order size in base currency (e.g. BTC for BTC-CLP).
|
|
547
|
+
example: 0.05
|
|
548
|
+
limit:
|
|
549
|
+
type: number
|
|
550
|
+
minimum: 0
|
|
551
|
+
description: Optional limit price in quote currency.
|
|
552
|
+
responses:
|
|
553
|
+
"200":
|
|
554
|
+
description: Quotation result with fill price, fees, and balance changes
|
|
555
|
+
content:
|
|
556
|
+
application/json:
|
|
557
|
+
schema:
|
|
558
|
+
$ref: "#/components/schemas/QuotationResponse"
|
|
559
|
+
"404":
|
|
560
|
+
$ref: "#/components/responses/NotFound"
|
|
561
|
+
|
|
491
562
|
/get_technical_indicators:
|
|
492
563
|
get:
|
|
493
564
|
operationId: getTechnicalIndicators
|
|
@@ -930,6 +1001,89 @@ components:
|
|
|
930
1001
|
type: string
|
|
931
1002
|
example: "Buda taker fee is 0.8% per leg. A round-trip arbitrage costs approximately 1.6% in fees."
|
|
932
1003
|
|
|
1004
|
+
BankEntry:
|
|
1005
|
+
type: object
|
|
1006
|
+
properties:
|
|
1007
|
+
id:
|
|
1008
|
+
type: string
|
|
1009
|
+
example: banco_estado
|
|
1010
|
+
name:
|
|
1011
|
+
type: string
|
|
1012
|
+
example: Banco Estado
|
|
1013
|
+
country:
|
|
1014
|
+
type: string
|
|
1015
|
+
nullable: true
|
|
1016
|
+
example: CL
|
|
1017
|
+
|
|
1018
|
+
AvailableBanksResponse:
|
|
1019
|
+
type: object
|
|
1020
|
+
properties:
|
|
1021
|
+
currency:
|
|
1022
|
+
type: string
|
|
1023
|
+
example: CLP
|
|
1024
|
+
banks:
|
|
1025
|
+
type: array
|
|
1026
|
+
description: Empty array if no banks are available for this currency.
|
|
1027
|
+
items:
|
|
1028
|
+
$ref: "#/components/schemas/BankEntry"
|
|
1029
|
+
|
|
1030
|
+
QuotationResponse:
|
|
1031
|
+
type: object
|
|
1032
|
+
properties:
|
|
1033
|
+
id:
|
|
1034
|
+
type: integer
|
|
1035
|
+
nullable: true
|
|
1036
|
+
example: 12345
|
|
1037
|
+
type:
|
|
1038
|
+
type: string
|
|
1039
|
+
enum: [Bid, Ask]
|
|
1040
|
+
market_id:
|
|
1041
|
+
type: string
|
|
1042
|
+
example: BTC-CLP
|
|
1043
|
+
amount:
|
|
1044
|
+
type: number
|
|
1045
|
+
description: Requested order size in base currency.
|
|
1046
|
+
example: 0.05
|
|
1047
|
+
amount_currency:
|
|
1048
|
+
type: string
|
|
1049
|
+
example: BTC
|
|
1050
|
+
limit:
|
|
1051
|
+
type: number
|
|
1052
|
+
nullable: true
|
|
1053
|
+
description: Limit price in quote currency, if provided.
|
|
1054
|
+
limit_currency:
|
|
1055
|
+
type: string
|
|
1056
|
+
nullable: true
|
|
1057
|
+
example: CLP
|
|
1058
|
+
base_balance_change:
|
|
1059
|
+
type: number
|
|
1060
|
+
description: Net change to base currency balance (negative for Ask).
|
|
1061
|
+
example: -0.05
|
|
1062
|
+
base_balance_change_currency:
|
|
1063
|
+
type: string
|
|
1064
|
+
example: BTC
|
|
1065
|
+
quote_balance_change:
|
|
1066
|
+
type: number
|
|
1067
|
+
description: Net change to quote currency balance (negative for Bid).
|
|
1068
|
+
example: 4000000
|
|
1069
|
+
quote_balance_change_currency:
|
|
1070
|
+
type: string
|
|
1071
|
+
example: CLP
|
|
1072
|
+
fee_amount:
|
|
1073
|
+
type: number
|
|
1074
|
+
description: Fee charged in quote currency.
|
|
1075
|
+
example: 32000
|
|
1076
|
+
fee_currency:
|
|
1077
|
+
type: string
|
|
1078
|
+
example: CLP
|
|
1079
|
+
order_amount:
|
|
1080
|
+
type: number
|
|
1081
|
+
description: Gross order value before fees.
|
|
1082
|
+
example: 4032000
|
|
1083
|
+
order_amount_currency:
|
|
1084
|
+
type: string
|
|
1085
|
+
example: CLP
|
|
1086
|
+
|
|
933
1087
|
SimulateOrderResponse:
|
|
934
1088
|
type: object
|
|
935
1089
|
properties:
|
|
@@ -1097,6 +1251,11 @@ components:
|
|
|
1097
1251
|
type: number
|
|
1098
1252
|
sma_50:
|
|
1099
1253
|
type: number
|
|
1254
|
+
nullable: true
|
|
1255
|
+
description: "Null when fewer than 50 candles are available; check sma_50_warning."
|
|
1256
|
+
sma_50_warning:
|
|
1257
|
+
type: string
|
|
1258
|
+
description: "Present only when sma_50 is null. Explains why SMA-50 could not be computed."
|
|
1100
1259
|
signals:
|
|
1101
1260
|
type: object
|
|
1102
1261
|
properties:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@guiie/buda-mcp",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.2",
|
|
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",
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
51
51
|
"express": "^5.2.1",
|
|
52
|
+
"express-rate-limit": "^8.3.2",
|
|
52
53
|
"zod": "^4.3.6"
|
|
53
54
|
},
|
|
54
55
|
"devDependencies": {
|