@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.
Files changed (113) hide show
  1. package/.cursor/rules/marketplace-docs-sync.mdc +32 -0
  2. package/CHANGELOG.md +79 -0
  3. package/PUBLISH_CHECKLIST.md +40 -88
  4. package/README.md +446 -78
  5. package/dist/cache.d.ts +1 -0
  6. package/dist/cache.d.ts.map +1 -1
  7. package/dist/cache.js +1 -0
  8. package/dist/client.d.ts +2 -0
  9. package/dist/client.d.ts.map +1 -1
  10. package/dist/client.js +18 -1
  11. package/dist/http.js +97 -6
  12. package/dist/index.js +42 -3
  13. package/dist/tools/account.d.ts +19 -0
  14. package/dist/tools/account.d.ts.map +1 -0
  15. package/dist/tools/account.js +49 -0
  16. package/dist/tools/balance.d.ts +29 -0
  17. package/dist/tools/balance.d.ts.map +1 -0
  18. package/dist/tools/balance.js +72 -0
  19. package/dist/tools/banks.d.ts +28 -0
  20. package/dist/tools/banks.d.ts.map +1 -0
  21. package/dist/tools/banks.js +68 -0
  22. package/dist/tools/batch_orders.d.ts +82 -0
  23. package/dist/tools/batch_orders.d.ts.map +1 -0
  24. package/dist/tools/batch_orders.js +188 -0
  25. package/dist/tools/cancel_all_orders.d.ts +34 -0
  26. package/dist/tools/cancel_all_orders.d.ts.map +1 -0
  27. package/dist/tools/cancel_all_orders.js +89 -0
  28. package/dist/tools/cancel_order.js +1 -1
  29. package/dist/tools/cancel_order_by_client_id.d.ts +34 -0
  30. package/dist/tools/cancel_order_by_client_id.d.ts.map +1 -0
  31. package/dist/tools/cancel_order_by_client_id.js +102 -0
  32. package/dist/tools/dead_mans_switch.d.ts +1 -1
  33. package/dist/tools/dead_mans_switch.d.ts.map +1 -1
  34. package/dist/tools/dead_mans_switch.js +33 -3
  35. package/dist/tools/deposits.d.ts +83 -0
  36. package/dist/tools/deposits.d.ts.map +1 -0
  37. package/dist/tools/deposits.js +174 -0
  38. package/dist/tools/fees.d.ts +34 -0
  39. package/dist/tools/fees.d.ts.map +1 -0
  40. package/dist/tools/fees.js +72 -0
  41. package/dist/tools/lightning.d.ts +68 -0
  42. package/dist/tools/lightning.d.ts.map +1 -0
  43. package/dist/tools/lightning.js +185 -0
  44. package/dist/tools/order_lookup.d.ts +50 -0
  45. package/dist/tools/order_lookup.d.ts.map +1 -0
  46. package/dist/tools/order_lookup.js +112 -0
  47. package/dist/tools/place_order.d.ts +30 -0
  48. package/dist/tools/place_order.d.ts.map +1 -1
  49. package/dist/tools/place_order.js +131 -2
  50. package/dist/tools/quotation.d.ts +44 -0
  51. package/dist/tools/quotation.d.ts.map +1 -0
  52. package/dist/tools/quotation.js +99 -0
  53. package/dist/tools/receive_addresses.d.ts +83 -0
  54. package/dist/tools/receive_addresses.d.ts.map +1 -0
  55. package/dist/tools/receive_addresses.js +185 -0
  56. package/dist/tools/remittance_recipients.d.ts +54 -0
  57. package/dist/tools/remittance_recipients.d.ts.map +1 -0
  58. package/dist/tools/remittance_recipients.js +106 -0
  59. package/dist/tools/remittances.d.ts +120 -0
  60. package/dist/tools/remittances.d.ts.map +1 -0
  61. package/dist/tools/remittances.js +261 -0
  62. package/dist/tools/simulate_order.d.ts.map +1 -1
  63. package/dist/tools/simulate_order.js +2 -1
  64. package/dist/tools/technical_indicators.d.ts.map +1 -1
  65. package/dist/tools/technical_indicators.js +2 -1
  66. package/dist/tools/withdrawals.d.ts +93 -0
  67. package/dist/tools/withdrawals.d.ts.map +1 -0
  68. package/dist/tools/withdrawals.js +225 -0
  69. package/dist/types.d.ts +155 -0
  70. package/dist/types.d.ts.map +1 -1
  71. package/dist/utils.d.ts.map +1 -1
  72. package/dist/utils.js +4 -1
  73. package/dist/validation.d.ts +11 -0
  74. package/dist/validation.d.ts.map +1 -1
  75. package/dist/validation.js +38 -0
  76. package/dist/version.d.ts.map +1 -1
  77. package/dist/version.js +8 -1
  78. package/marketplace/README.md +1 -1
  79. package/marketplace/claude-listing.md +101 -2
  80. package/marketplace/gemini-tools.json +478 -1
  81. package/marketplace/openapi.yaml +160 -1
  82. package/package.json +2 -1
  83. package/server.json +2 -2
  84. package/src/cache.ts +1 -0
  85. package/src/client.ts +23 -1
  86. package/src/http.ts +105 -6
  87. package/src/index.ts +40 -3
  88. package/src/tools/account.ts +66 -0
  89. package/src/tools/balance.ts +94 -0
  90. package/src/tools/banks.ts +94 -0
  91. package/src/tools/batch_orders.ts +238 -0
  92. package/src/tools/cancel_all_orders.ts +117 -0
  93. package/src/tools/cancel_order.ts +1 -1
  94. package/src/tools/cancel_order_by_client_id.ts +132 -0
  95. package/src/tools/dead_mans_switch.ts +39 -3
  96. package/src/tools/deposits.ts +230 -0
  97. package/src/tools/fees.ts +91 -0
  98. package/src/tools/lightning.ts +247 -0
  99. package/src/tools/order_lookup.ts +139 -0
  100. package/src/tools/place_order.ts +151 -2
  101. package/src/tools/quotation.ts +124 -0
  102. package/src/tools/receive_addresses.ts +242 -0
  103. package/src/tools/remittance_recipients.ts +139 -0
  104. package/src/tools/remittances.ts +325 -0
  105. package/src/tools/simulate_order.ts +1 -0
  106. package/src/tools/technical_indicators.ts +2 -1
  107. package/src/tools/withdrawals.ts +287 -0
  108. package/src/types.ts +210 -0
  109. package/src/utils.ts +3 -1
  110. package/src/validation.ts +45 -0
  111. package/src/version.ts +11 -3
  112. package/test/run-all.ts +16 -0
  113. package/test/unit.ts +2149 -1
@@ -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",
@@ -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?'",
@@ -393,6 +712,164 @@
393
712
  },
394
713
  "required": ["order_id", "confirmation_token"]
395
714
  }
715
+ },
716
+ {
717
+ "name": "cancel_all_orders",
718
+ "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.",
719
+ "parameters": {
720
+ "type": "OBJECT",
721
+ "properties": {
722
+ "market_id": {
723
+ "type": "STRING",
724
+ "description": "Market ID (e.g. 'BTC-CLP') or '*' to cancel orders across all markets."
725
+ },
726
+ "confirmation_token": {
727
+ "type": "STRING",
728
+ "description": "Safety confirmation. Must equal exactly 'CONFIRM' (case-sensitive) to execute."
729
+ }
730
+ },
731
+ "required": ["market_id", "confirmation_token"]
732
+ }
733
+ },
734
+ {
735
+ "name": "cancel_order_by_client_id",
736
+ "description": "Cancels an open order by its client-assigned string ID on Buda.com. IMPORTANT: Requires confirmation_token='CONFIRM'. Auth-gated.",
737
+ "parameters": {
738
+ "type": "OBJECT",
739
+ "properties": {
740
+ "client_id": {
741
+ "type": "STRING",
742
+ "description": "The client ID string assigned when placing the order."
743
+ },
744
+ "confirmation_token": {
745
+ "type": "STRING",
746
+ "description": "Safety confirmation. Must equal exactly 'CONFIRM' (case-sensitive) to execute."
747
+ }
748
+ },
749
+ "required": ["client_id", "confirmation_token"]
750
+ }
751
+ },
752
+ {
753
+ "name": "place_batch_orders",
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.",
755
+ "parameters": {
756
+ "type": "OBJECT",
757
+ "properties": {
758
+ "orders": {
759
+ "type": "ARRAY",
760
+ "description": "Array of 1–20 orders to place. Each order: market_id, type (Bid/Ask), price_type (limit/market), amount, optional limit_price."
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
+ },
766
+ "confirmation_token": {
767
+ "type": "STRING",
768
+ "description": "Safety confirmation. Must equal exactly 'CONFIRM' (case-sensitive) to execute."
769
+ }
770
+ },
771
+ "required": ["orders", "confirmation_token"]
772
+ }
773
+ },
774
+ {
775
+ "name": "create_withdrawal",
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.",
777
+ "parameters": {
778
+ "type": "OBJECT",
779
+ "properties": {
780
+ "currency": {
781
+ "type": "STRING",
782
+ "description": "Currency code (e.g. 'BTC', 'CLP')."
783
+ },
784
+ "amount": {
785
+ "type": "NUMBER",
786
+ "description": "Withdrawal amount."
787
+ },
788
+ "address": {
789
+ "type": "STRING",
790
+ "description": "Destination crypto address. Mutually exclusive with bank_account_id."
791
+ },
792
+ "network": {
793
+ "type": "STRING",
794
+ "description": "Blockchain network (e.g. 'bitcoin', 'ethereum'). Optional."
795
+ },
796
+ "bank_account_id": {
797
+ "type": "INTEGER",
798
+ "description": "Fiat bank account ID. Mutually exclusive with address."
799
+ },
800
+ "confirmation_token": {
801
+ "type": "STRING",
802
+ "description": "Safety confirmation. Must equal exactly 'CONFIRM' (case-sensitive) to execute."
803
+ }
804
+ },
805
+ "required": ["currency", "amount", "confirmation_token"]
806
+ }
807
+ },
808
+ {
809
+ "name": "create_fiat_deposit",
810
+ "description": "Records a fiat deposit on Buda.com. IMPORTANT: Calling twice creates duplicate records. Requires confirmation_token='CONFIRM'. Auth-gated.",
811
+ "parameters": {
812
+ "type": "OBJECT",
813
+ "properties": {
814
+ "currency": {
815
+ "type": "STRING",
816
+ "description": "Fiat currency code (e.g. 'CLP', 'COP', 'PEN')."
817
+ },
818
+ "amount": {
819
+ "type": "NUMBER",
820
+ "description": "Deposit amount."
821
+ },
822
+ "bank": {
823
+ "type": "STRING",
824
+ "description": "Bank name or identifier for the deposit source. Optional."
825
+ },
826
+ "confirmation_token": {
827
+ "type": "STRING",
828
+ "description": "Safety confirmation. Must equal exactly 'CONFIRM' (case-sensitive) to execute."
829
+ }
830
+ },
831
+ "required": ["currency", "amount", "confirmation_token"]
832
+ }
833
+ },
834
+ {
835
+ "name": "lightning_withdrawal",
836
+ "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.",
837
+ "parameters": {
838
+ "type": "OBJECT",
839
+ "properties": {
840
+ "invoice": {
841
+ "type": "STRING",
842
+ "description": "BOLT-11 Lightning invoice string (starts with 'lnbc', 'lntb', etc.)."
843
+ },
844
+ "confirmation_token": {
845
+ "type": "STRING",
846
+ "description": "Safety confirmation. Must equal exactly 'CONFIRM' (case-sensitive) to execute."
847
+ }
848
+ },
849
+ "required": ["invoice", "confirmation_token"]
850
+ }
851
+ },
852
+ {
853
+ "name": "create_lightning_invoice",
854
+ "description": "Creates a Bitcoin Lightning Network receive invoice on Buda.com. No confirmation required — no funds leave the account. Auth-gated.",
855
+ "parameters": {
856
+ "type": "OBJECT",
857
+ "properties": {
858
+ "amount_satoshis": {
859
+ "type": "INTEGER",
860
+ "description": "Invoice amount in satoshis (positive integer)."
861
+ },
862
+ "description": {
863
+ "type": "STRING",
864
+ "description": "Optional payment description (max 140 characters)."
865
+ },
866
+ "expiry_seconds": {
867
+ "type": "INTEGER",
868
+ "description": "Invoice expiry in seconds (60–86400). Default: 3600."
869
+ }
870
+ },
871
+ "required": ["amount_satoshis"]
872
+ }
396
873
  }
397
874
  ]
398
875
  }
@@ -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.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: