@guiie/buda-mcp 1.2.2 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +37 -0
- package/PUBLISH_CHECKLIST.md +62 -53
- package/dist/http.js +22 -0
- package/dist/index.js +19 -0
- package/dist/tools/arbitrage.d.ts +35 -0
- package/dist/tools/arbitrage.d.ts.map +1 -0
- package/dist/tools/arbitrage.js +142 -0
- package/dist/tools/balances.d.ts.map +1 -1
- package/dist/tools/balances.js +24 -4
- package/dist/tools/compare_markets.d.ts.map +1 -1
- package/dist/tools/compare_markets.js +11 -10
- package/dist/tools/market_summary.d.ts +43 -0
- package/dist/tools/market_summary.d.ts.map +1 -0
- package/dist/tools/market_summary.js +81 -0
- package/dist/tools/markets.d.ts.map +1 -1
- package/dist/tools/markets.js +4 -2
- package/dist/tools/orderbook.d.ts.map +1 -1
- package/dist/tools/orderbook.js +14 -4
- package/dist/tools/orders.d.ts.map +1 -1
- package/dist/tools/orders.js +41 -3
- package/dist/tools/price_history.js +14 -14
- package/dist/tools/spread.d.ts.map +1 -1
- package/dist/tools/spread.js +10 -8
- package/dist/tools/ticker.d.ts.map +1 -1
- package/dist/tools/ticker.js +24 -3
- package/dist/tools/trades.d.ts.map +1 -1
- package/dist/tools/trades.js +17 -3
- package/dist/tools/volume.d.ts.map +1 -1
- package/dist/tools/volume.js +21 -3
- package/dist/utils.d.ts +17 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +21 -0
- package/marketplace/README.md +1 -1
- package/marketplace/claude-listing.md +26 -14
- package/marketplace/gemini-tools.json +41 -9
- package/marketplace/openapi.yaml +335 -119
- package/package.json +1 -1
- package/server.json +2 -2
- package/src/http.ts +27 -0
- package/src/index.ts +24 -0
- package/src/tools/arbitrage.ts +202 -0
- package/src/tools/balances.ts +27 -4
- package/src/tools/compare_markets.ts +11 -10
- package/src/tools/market_summary.ts +124 -0
- package/src/tools/markets.ts +4 -2
- package/src/tools/orderbook.ts +15 -4
- package/src/tools/orders.ts +45 -4
- package/src/tools/price_history.ts +17 -17
- package/src/tools/spread.ts +10 -8
- package/src/tools/ticker.ts +27 -3
- package/src/tools/trades.ts +18 -3
- package/src/tools/volume.ts +24 -3
- package/src/utils.ts +21 -0
- package/test/unit.ts +254 -0
|
@@ -12,7 +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, 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 and order management.
|
|
16
|
+
|
|
17
|
+
**v1.3.0 output quality improvements:** All response schemas are now flat and fully typed — monetary amounts are returned as floats with separate `_currency` fields instead of `["amount", "currency"]` arrays, making responses directly usable by LLMs without parsing.
|
|
16
18
|
|
|
17
19
|
---
|
|
18
20
|
|
|
@@ -20,48 +22,55 @@ Use this server to query live prices, spreads, order books, OHLCV candles, trade
|
|
|
20
22
|
|
|
21
23
|
### Public tools (no credentials required)
|
|
22
24
|
|
|
25
|
+
### `get_market_summary` ⭐ Start here
|
|
26
|
+
One-call summary of everything relevant about a market: last price, bid/ask, spread %, 24h volume, price change, and `liquidity_rating` ("high" / "medium" / "low"). Best first tool to call when a user asks about any specific market.
|
|
27
|
+
**Parameters:** `market_id` *(required)* — e.g. `BTC-CLP`.
|
|
28
|
+
|
|
23
29
|
### `get_markets`
|
|
24
|
-
|
|
25
|
-
Returns: base/quote currencies, trading fees, minimum order amounts, fee discount tiers.
|
|
30
|
+
Lists all available trading pairs on Buda.com, or returns details for a specific market (fees, minimum order size, discount tiers).
|
|
26
31
|
**Parameters:** `market_id` *(optional)* — e.g. `BTC-CLP`. Omit to list all 26 markets.
|
|
27
32
|
|
|
28
33
|
### `get_ticker`
|
|
29
|
-
Current market snapshot: last traded price, best bid and ask, 24h volume, and price change over 24h and 7d.
|
|
34
|
+
Current market snapshot: last traded price, best bid and ask, 24h volume, and price change over 24h and 7d. All values are floats in the quote currency.
|
|
30
35
|
**Parameters:** `market_id` *(required)* — e.g. `BTC-CLP`, `ETH-COP`, `ETH-BTC`.
|
|
31
36
|
|
|
32
37
|
### `get_orderbook`
|
|
33
|
-
Full order book for a market:
|
|
38
|
+
Full order book for a market: bids and asks as `{price, amount}` objects (floats). Bids sorted highest-first, asks lowest-first.
|
|
34
39
|
**Parameters:** `market_id` *(required)*, `limit` *(optional)* — cap levels returned per side.
|
|
35
40
|
|
|
36
41
|
### `get_trades`
|
|
37
|
-
Recent trade history
|
|
42
|
+
Recent trade history as typed objects: `{timestamp_ms, amount, price, direction}` with all numeric fields as floats.
|
|
38
43
|
**Parameters:** `market_id` *(required)*, `limit` *(optional, max 100)*, `timestamp` *(optional, for pagination)*.
|
|
39
44
|
|
|
40
45
|
### `get_market_volume`
|
|
41
|
-
24h and 7-day transacted volume broken down by buy (bid) and sell (ask) side.
|
|
46
|
+
24h and 7-day transacted volume as floats broken down by buy (bid) and sell (ask) side.
|
|
42
47
|
**Parameters:** `market_id` *(required)*.
|
|
43
48
|
|
|
44
49
|
### `get_spread`
|
|
45
|
-
Bid/ask spread for a market:
|
|
50
|
+
Bid/ask spread for a market: `best_bid`, `best_ask`, `spread_absolute`, and `spread_percentage` as floats. `spread_percentage` is in percent (e.g. 0.15 = 0.15%).
|
|
46
51
|
**Parameters:** `market_id` *(required)*.
|
|
47
52
|
|
|
48
53
|
### `compare_markets`
|
|
49
|
-
Side-by-side ticker data for all trading pairs of a given base currency across all supported quote currencies.
|
|
54
|
+
Side-by-side ticker data for all trading pairs of a given base currency across all supported quote currencies. `price_change_*` fields are floats in percent.
|
|
50
55
|
**Parameters:** `base_currency` *(required)* — e.g. `BTC`, `ETH`, `XRP`.
|
|
51
56
|
|
|
52
57
|
### `get_price_history`
|
|
53
|
-
OHLCV (open/high/low/close/volume) candles derived from recent trade history (Buda has no native candlestick endpoint). Supports `1h`, `4h`, and `1d` periods.
|
|
54
|
-
**Parameters:** `market_id` *(required)*, `period` *(optional: `1h`/`4h`/`1d`, default `1h`)*, `limit` *(optional, default 100, max 1000 trades
|
|
58
|
+
OHLCV (open/high/low/close/volume) candles derived from recent trade history (Buda has no native candlestick endpoint). All candle values are floats. Supports `1h`, `4h`, and `1d` periods.
|
|
59
|
+
**Parameters:** `market_id` *(required)*, `period` *(optional: `1h`/`4h`/`1d`, default `1h`)*, `limit` *(optional, default 100, max 1000 trades)*.
|
|
60
|
+
|
|
61
|
+
### `get_arbitrage_opportunities`
|
|
62
|
+
Detects cross-country price discrepancies for a given asset across Buda's CLP, COP, and PEN markets, normalized to USDC. Returns pairwise discrepancies above `threshold_pct` sorted by size. Includes a `fees_note` reminding that Buda's 0.8% taker fee per leg (~1.6% round-trip) must be deducted.
|
|
63
|
+
**Parameters:** `base_currency` *(required)* — e.g. `BTC`, `threshold_pct` *(optional, default 0.5)*.
|
|
55
64
|
|
|
56
65
|
### Authenticated tools (require `BUDA_API_KEY` + `BUDA_API_SECRET`)
|
|
57
66
|
|
|
58
67
|
> **Important:** Authenticated instances must run locally only — never expose a server with API credentials publicly.
|
|
59
68
|
|
|
60
69
|
### `get_balances`
|
|
61
|
-
All currency balances: total, available, frozen, and pending withdrawal amounts.
|
|
70
|
+
All currency balances as flat typed objects: total, available, frozen, and pending withdrawal amounts as floats with `_currency` suffix fields.
|
|
62
71
|
|
|
63
72
|
### `get_orders`
|
|
64
|
-
Orders for a given market
|
|
73
|
+
Orders for a given market as flat typed objects. All monetary amounts are floats with `_currency` fields. Filterable by state (`pending`, `active`, `traded`, `canceled`).
|
|
65
74
|
**Parameters:** `market_id` *(required)*, `state` *(optional)*, `per` *(optional)*, `page` *(optional)*.
|
|
66
75
|
|
|
67
76
|
### `place_order`
|
|
@@ -79,13 +88,16 @@ Cancel an open order by ID. Requires `confirmation_token="CONFIRM"`.
|
|
|
79
88
|
| URI | Description |
|
|
80
89
|
|-----|-------------|
|
|
81
90
|
| `buda://markets` | JSON list of all Buda.com markets |
|
|
82
|
-
| `buda://ticker/{market}` |
|
|
91
|
+
| `buda://ticker/{market}` | Raw ticker for a specific market |
|
|
92
|
+
| `buda://summary/{market}` | Full market summary with liquidity rating |
|
|
83
93
|
|
|
84
94
|
---
|
|
85
95
|
|
|
86
96
|
## Example prompts
|
|
87
97
|
|
|
98
|
+
- *"Give me a complete overview of the BTC-CLP market."*
|
|
88
99
|
- *"What is the current Bitcoin price in Chilean pesos?"*
|
|
100
|
+
- *"Is there an arbitrage opportunity for BTC between Chile and Peru?"*
|
|
89
101
|
- *"Show me the BTC-CLP order book — top 10 bids and asks."*
|
|
90
102
|
- *"How much ETH was traded on Buda in the last 7 days?"*
|
|
91
103
|
- *"List all markets available on Buda.com."*
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_comment": "Gemini function declarations for buda-mcp v1.
|
|
2
|
+
"_comment": "Gemini function declarations for buda-mcp v1.3.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",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Lists all available trading pairs on Buda.com, or returns details for a specific market (base/quote currencies, taker/maker fees as decimals, minimum order size in base currency, and fee discount tiers). Omit market_id to get all ~26 markets at once. Example: 'What is the taker fee and minimum order size for BTC-CLP?'",
|
|
7
7
|
"parameters": {
|
|
8
8
|
"type": "OBJECT",
|
|
9
9
|
"properties": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
"name": "get_ticker",
|
|
20
|
-
"description": "
|
|
20
|
+
"description": "Returns the current market snapshot for a Buda.com market: last traded price, best bid, best ask, 24h volume, and price change over 24h and 7d. All prices are floats in the quote currency (e.g. CLP for BTC-CLP). price_variation_24h is a decimal fraction (0.012 = +1.2%). Example: 'What is the current Bitcoin price in Chilean pesos?'",
|
|
21
21
|
"parameters": {
|
|
22
22
|
"type": "OBJECT",
|
|
23
23
|
"properties": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
"name": "get_orderbook",
|
|
34
|
-
"description": "
|
|
34
|
+
"description": "Returns the current order book for a Buda.com market as typed objects with float price and amount fields. Bids are sorted highest-price first; asks lowest-price first. Prices are in the quote currency; amounts are in the base currency. Example: 'What are the top 5 buy and sell orders for BTC-CLP right now?'",
|
|
35
35
|
"parameters": {
|
|
36
36
|
"type": "OBJECT",
|
|
37
37
|
"properties": {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
"name": "get_trades",
|
|
52
|
-
"description": "
|
|
52
|
+
"description": "Returns recent trade history for a Buda.com market as typed objects. Each entry has timestamp_ms (integer), amount (float, base currency), price (float, quote currency), and direction ('buy' or 'sell'). Example: 'What was the last executed price for BTC-CLP and was it a buy or sell?'",
|
|
53
53
|
"parameters": {
|
|
54
54
|
"type": "OBJECT",
|
|
55
55
|
"properties": {
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
},
|
|
72
72
|
{
|
|
73
73
|
"name": "get_market_volume",
|
|
74
|
-
"description": "
|
|
74
|
+
"description": "Returns 24h and 7-day transacted volume for a Buda.com market, split by buy (bid) and sell (ask) side. All volume values are floats in the base currency (e.g. BTC for BTC-CLP). Example: 'How much Bitcoin was sold on BTC-CLP in the last 24 hours?'",
|
|
75
75
|
"parameters": {
|
|
76
76
|
"type": "OBJECT",
|
|
77
77
|
"properties": {
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
},
|
|
86
86
|
{
|
|
87
87
|
"name": "get_spread",
|
|
88
|
-
"description": "
|
|
88
|
+
"description": "Returns the best bid, best ask, absolute spread, and spread percentage for a Buda.com market. All prices are floats in the quote currency (e.g. CLP). spread_percentage is a float in percent (e.g. 0.15 means 0.15%). Use this to evaluate liquidity before placing a large order. Example: 'Is BTC-CLP liquid enough to buy 10M CLP without significant slippage?'",
|
|
89
89
|
"parameters": {
|
|
90
90
|
"type": "OBJECT",
|
|
91
91
|
"properties": {
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
},
|
|
100
100
|
{
|
|
101
101
|
"name": "compare_markets",
|
|
102
|
-
"description": "
|
|
102
|
+
"description": "Returns side-by-side ticker data for all trading pairs of a given base currency across Buda.com's supported quote currencies (CLP, COP, PEN, BTC, USDC, ETH). All prices are floats; price_change_24h and price_change_7d are floats in percent (e.g. 1.23 means +1.23%). Example: 'In which country is Bitcoin currently most expensive on Buda?'",
|
|
103
103
|
"parameters": {
|
|
104
104
|
"type": "OBJECT",
|
|
105
105
|
"properties": {
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
115
|
"name": "get_price_history",
|
|
116
|
-
"description": "IMPORTANT: Candles are aggregated client-side from raw trades (Buda has no native candlestick endpoint) —
|
|
116
|
+
"description": "IMPORTANT: Candles are aggregated client-side from raw trades (Buda has no native candlestick endpoint) — fetching more trades via the 'limit' parameter gives deeper history but slower responses. Returns OHLCV candles (open/high/low/close as floats in quote currency; volume as float in base currency) for periods 1h, 4h, or 1d. Candle timestamps are UTC bucket boundaries. Example: 'Show me the hourly BTC-CLP price chart for the past 24 hours.'",
|
|
117
117
|
"parameters": {
|
|
118
118
|
"type": "OBJECT",
|
|
119
119
|
"properties": {
|
|
@@ -132,6 +132,38 @@
|
|
|
132
132
|
},
|
|
133
133
|
"required": ["market_id"]
|
|
134
134
|
}
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"name": "get_market_summary",
|
|
138
|
+
"description": "One-call summary of everything relevant about a market: last price, best bid/ask, spread %, 24h volume, 24h and 7d price change, and a liquidity_rating ('high' / 'medium' / 'low' based on spread thresholds: < 0.3% = high, 0.3–1% = medium, > 1% = low). All prices and volumes are floats. Best first tool to call when a user asks about any specific market. Example: 'Give me a complete overview of the BTC-CLP market right now.'",
|
|
139
|
+
"parameters": {
|
|
140
|
+
"type": "OBJECT",
|
|
141
|
+
"properties": {
|
|
142
|
+
"market_id": {
|
|
143
|
+
"type": "STRING",
|
|
144
|
+
"description": "Market identifier such as 'BTC-CLP', 'ETH-COP', or 'BTC-PEN'. Case-insensitive."
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"required": ["market_id"]
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"name": "get_arbitrage_opportunities",
|
|
152
|
+
"description": "Detects cross-country price discrepancies for a given asset across Buda's CLP, COP, and PEN markets, normalized to USDC. Fetches all relevant tickers, converts each local price to USDC using the current USDC-CLP / USDC-COP / USDC-PEN rates, then computes pairwise discrepancy percentages. Results above threshold_pct are returned sorted by opportunity size. Note: Buda taker fee is 0.8% per leg (~1.6% round-trip) — always deduct fees before acting on any discrepancy. Example: 'Is there an arbitrage opportunity for BTC between Chile and Peru right now?'",
|
|
153
|
+
"parameters": {
|
|
154
|
+
"type": "OBJECT",
|
|
155
|
+
"properties": {
|
|
156
|
+
"base_currency": {
|
|
157
|
+
"type": "STRING",
|
|
158
|
+
"description": "Base asset to scan. Examples: 'BTC', 'ETH', 'XRP'. Case-insensitive."
|
|
159
|
+
},
|
|
160
|
+
"threshold_pct": {
|
|
161
|
+
"type": "NUMBER",
|
|
162
|
+
"description": "Minimum price discrepancy percentage to include in results (default: 0.5). Buda taker fee is 0.8% per leg, so a round-trip requires > 1.6% to be profitable."
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
"required": ["base_currency"]
|
|
166
|
+
}
|
|
135
167
|
}
|
|
136
168
|
]
|
|
137
169
|
}
|