RAVN

Cross-chain swap API for native Bitcoin, Solana and EVM chains. No API key, no custody.

我該用這個嗎

品質與安全性

A
說明品質
100%
結構描述完整度
92%
命名品質
80%
汙染風險
100%
權限相符程度
100%
協定合規性
100%

根據工具定義與協定合規性的自動化分析。

上下文成本

~6,713Token(工具定義)
~6.9 KB典型回應大小
顯著的注意力影響(128k 上下文的 5.24%)

這是每次將伺服器的工具載入模型上下文時所消耗的約略 token 數量。數量越高,可用於其他工作的注意力就越少。

安裝

一鍵安裝

將以下內容加入你的 `claude_desktop_config.json` 檔案:

{
  "mcpServers": {
    "ravn": {
      "url": "https://app.ravn.exchange/api/mcp"
    }
  }
}

遠端端點

https://app.ravn.exchange/api/mcpstreamable-http

它能做什麼

工具清單

工具(10)

🟢 唯讀🟡 寫入🔴 刪除⚪ 未知
🟢ravn_quote(inputChainId, outputChainId, inputToken, outputToken, inputAmount, ...)

Get a swap quote from RAVN — same-chain or cross-chain, across 17 chains including native (non-wrapped) Bitcoin and Solana as source or destination. Free, no API key or payment required. Returns a quoteToken; pass it to ravn_execute to get a signable/broadcastable execution payload.

輸入結構描述

{
  "type": "object",
  "properties": {
    "inputChainId": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991,
      "description": "Numeric chain id, e.g. 1=Ethereum, 8453=Base, -1=Bitcoin, -2=Solana — see ravn_chains for the full list, or ravn_health for live venue status"
    },
    "outputChainId": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991,
      "description": "Numeric chain id, e.g. 1=Ethereum, 8453=Base, -1=Bitcoin, -2=Solana — see ravn_chains for the full list, or ravn_health for live venue status"
    },
    "inputToken": {
      "type": "string",
      "description": "Token contract address, or 0xEeeeeEeeeEeEeeEeEeEeeeEEeeeeEeeeeeeeEEeE for the chain's native coin"
    },
    "outputToken": {
      "type": "string",
      "description": "Token contract address, or 0xEeeeeEeeeEeEeeEeEeEeeeEEeeeeEeeeeeeeEEeE for the chain's native coin"
    },
    "inputAmount": {
      "type": "string",
      "description": "Positive integer string, in the input token's smallest unit (no decimals)"
    },
    "userAddress": {
      "type": "string",
      "description": "Address the input asset will be sent from"
    },
    "destinationAddress": {
      "description": "Where output should land, if different from userAddress. Required here, at quote time, to get an executable quote from Relay (Bitcoin as the source), THORChain (Bitcoin either direction), Across (a Solana-touching route), or Eco (a cross-ecosystem route) — omit it there and you get back a priced-but-unexecutable preview instead (see ravn_quote's executable), not an error. A malformed address, one from the wrong ecosystem, or a known non-wallet address (a RAVN-listed token's mint/contract, this swap's own tokens, the native-coin sentinel, burn addresses, Solana core programs, and via an on-chain lookup a Solana token account or program — the token-account error names the owning wallet, which is the address to use) IS an error here — funds sent there are unrecoverable. Omit the field rather than passing an empty string; an empty string is treated as omitted",
      "type": "string"
    },
    "refundAddress": {
      "description": "Where to refund the input asset if the swap fails. Required here, at quote time, for a Bitcoin-source Relay or THORChain quote — neither has an execute-time re-bind, so omitting it returns a priced-but-unexecutable preview and supplying it later on ravn_execute has no effect. Other BTC-source venues (Garden, Chainflip, Rift) support binding this at execute time instead. Validated against the INPUT chain (refunds are paid back on the origin), with the same non-wallet-address check as destinationAddress",
      "type": "string"
    },
    "slippageBps": {
      "description": "Max acceptable slippage in basis points",
      "type": "integer",
      "minimum": 1,
      "maximum": 5000
    },
    "rankingMode": {
      "description": "best_output (default) picks the highest net output; fastest picks the quickest-settling quote within slippageBps",
      "type": "string",
      "enum": [
        "best_output",
        "fastest"
      ]
    },
    "excludeVenues": {
      "description": "Drop specific venues from this race, e.g. a risk objection to one of them or ravn_health showing it degraded. Naming a venue that was never eligible for this pair is a no-op, not an error",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "confidential": {
      "description": "Settle privately via NEAR Intents' Confidential Intents so the deposit and payout can't be linked on-chain. Through this MCP server only NEAR quotes it (NO_LIQUIDITY if it can't, never a public fallback): RAVN's second private venue, Houdini Swap, needs the end user's IP, user-agent and country for its compliance rules, which an MCP call doesn't carry — use POST /api/v1/quote for it. ~0.3 bps extra on EVM-to-EVM, ~5-8 bps extra when Bitcoin or Solana is a leg, and it can settle slower than a public swap (Bitcoin-source: 13 min public vs 43 min confidential) — read estimatedTimeSeconds before executing",
      "type": "boolean"
    },
    "apiKey": {
      "description": "Your RAVN API key, if you have one — raises your rate limit",
      "type": "string"
    }
  },
  "required": [
    "inputChainId",
    "outputChainId",
    "inputToken",
    "outputToken",
    "inputAmount",
    "userAddress"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}

輸出結構描述

{
  "type": "object",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "quoteToken": {
              "type": "string",
              "description": "Opaque token — pass to ravn_execute"
            },
            "venue": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "routeType": {
              "type": "string"
            },
            "input": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "output": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "fee": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "executable": {
              "type": "boolean",
              "description": "False = preview-only price, priced against a placeholder destination/refund address. ravn_execute will fail with QUOTE_NOT_EXECUTABLE — request a fresh quote with destinationAddress/refundAddress supplied instead"
            },
            "slippage": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "bps": {
                      "type": "number"
                    },
                    "isFirm": {
                      "type": "boolean"
                    },
                    "guaranteedMin": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "noMinimum": {
                      "type": "boolean",
                      "description": "True when the venue enforces no minimum output (Rift fills at its own rate once the deposit lands); bps is then not a protection"
                    }
                  },
                  "required": [
                    "bps",
                    "isFirm",
                    "guaranteedMin",
                    "noMinimum"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ],
              "description": "Null when the venue reports no slippage bound"
            },
            "gas": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "native": {
                      "type": "string"
                    },
                    "nativeSymbol": {
                      "type": "string"
                    },
                    "usd": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "estimated": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "native",
                    "nativeSymbol",
                    "usd",
                    "estimated"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ],
              "description": "The native gas the user must hold; null on gasless venues"
            },
            "inputUsd": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "USD value of the input amount, same price source as gas.usd. Null when the token can't be priced"
            },
            "outputUsd": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "USD value of the output amount. Compare against inputUsd for price impact"
            },
            "estimatedTimeSeconds": {
              "type": "number"
            },
            "estimatedTimeIsGuess": {
              "type": "boolean",
              "description": "True when the time is RAVN's estimate, not the venue's own figure"
            },
            "expiresAt": {
              "type": "number"
            },
            "hops": {
              "description": "2-hop / dest-call: the venues actually used. Sign hop 1; hop 2 is a unique deposit",
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ],
                "additionalProperties": false
              }
            },
            "alternatives": {
              "type": "array",
              "items": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              "description": "Every other venue that raced and produced a usable quote, best expected net output first (a quote with slippage.noMinimum counts 0.3% under its outputAmount, the shortfall such a venue typically delivers). Each has its own quoteToken to pass to ravn_execute instead. Empty when no other venue could serve this pair, or when a route was excluded via excludeVenues"
            }
          },
          "required": [
            "quoteToken",
            "venue",
            "routeType",
            "input",
            "output",
            "fee",
            "executable",
            "slippage",
            "gas",
            "inputUsd",
            "outputUsd",
            "estimatedTimeSeconds",
            "estimatedTimeIsGuess",
            "expiresAt",
            "alternatives"
          ],
          "additionalProperties": false
        },
        "meta": {
          "type": "object",
          "properties": {
            "requestId": {
              "type": "string"
            },
            "version": {
              "type": "string"
            }
          },
          "required": [
            "requestId",
            "version"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "data",
        "meta"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "error": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string"
            },
            "message": {
              "type": "string"
            },
            "details": {}
          },
          "required": [
            "code",
            "message"
          ],
          "additionalProperties": false
        },
        "meta": {
          "type": "object",
          "properties": {
            "requestId": {
              "type": "string"
            },
            "version": {
              "type": "string"
            }
          },
          "required": [
            "requestId",
            "version"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "error",
        "meta"
      ],
      "additionalProperties": false
    }
  ]
}
🟡ravn_execute(quoteToken, destinationAddress, refundAddress, apiKey)

Turn a quoteToken from ravn_quote into an execution payload. Returns one of three shapes (executionType): TRANSACTION (sign and broadcast yourself), SIGNATURE (sign, RAVN submits), or DEPOSIT (send the input asset to a given address). RAVN never takes custody of funds — you always sign or send from your own wallet. TRANSACTION and SIGNATURE may also include an `approval` — an ERC-20 approve() you must broadcast and wait to be MINED before the transaction/signature, or it fails (reverts on TRANSACTION; on SIGNATURE the order is accepted and silently never fills). Only present when the sold token needs it — omitted for native-coin sells and already-approved tokens.

輸入結構描述

{
  "type": "object",
  "properties": {
    "quoteToken": {
      "type": "string",
      "description": "The quoteToken returned by ravn_quote"
    },
    "destinationAddress": {
      "description": "Late-bound output recipient, honoured by venues that bind at execution time (Chainflip, Garden, Layerswap, Mayan, NEAR Intents, Rift, 2-hop). Every other venue fixes the recipient when it prices: a DIFFERENT address here is rejected rather than silently ignored. Supply destinationAddress on ravn_quote instead, which every venue honours",
      "type": "string"
    },
    "refundAddress": {
      "description": "Late-bound refund recipient if the swap fails, honoured by the same venues as destinationAddress. Every other venue fixes the refund address when it prices, and a DIFFERENT one here is rejected rather than silently ignored; supply refundAddress on ravn_quote instead",
      "type": "string"
    },
    "apiKey": {
      "description": "Your RAVN API key, if you have one — raises your rate limit",
      "type": "string"
    }
  },
  "required": [
    "quoteToken"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}

輸出結構描述

{
  "type": "object",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "executionType": {
              "type": "string",
              "enum": [
                "DEPOSIT",
                "TRANSACTION",
                "SIGNATURE"
              ]
            },
            "approval": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "transaction": {
              "description": "TRANSACTION only",
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "typedData": {
              "description": "SIGNATURE only",
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "approvalData": {
              "description": "SIGNATURE only, 0x Gasless: a second EIP-712 payload some venues need signed for the approval itself",
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "submit": {
              "description": "SIGNATURE only: { url, payload? } — POST the signed payload(s) to ravn_status's ref via /api/v1/submit-signature",
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "deposit": {
              "description": "DEPOSIT only",
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "quoteToken": {
              "type": "string",
              "description": "Pass to ravn_submit_signature and ravn_status. On compose this is the post-bind token from execute, not the original quote token"
            },
            "statusRef": {
              "description": "Poll ravn_status with this. Always set for DEPOSIT and compose; TRANSACTION otherwise uses the origin tx hash",
              "type": "string"
            }
          },
          "required": [
            "executionType",
            "quoteToken"
          ],
          "additionalProperties": false
        },
        "meta": {
          "type": "object",
          "properties": {
            "requestId": {
              "type": "string"
            },
            "version": {
              "type": "string"
            }
          },
          "required": [
            "requestId",
            "version"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "data",
        "meta"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "error": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string"
            },
            "message": {
              "type": "string"
            },
            "details": {}
          },
          "required": [
            "code",
            "message"
          ],
          "additionalProperties": false
        },
        "meta": {
          "type": "object",
          "properties": {
            "requestId": {
              "type": "string"
            },
            "version": {
              "type": "string"
            }
          },
          "required": [
            "requestId",
            "version"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "error",
        "meta"
      ],
      "additionalProperties": false
    }
  ]
}
🟡ravn_submit_signature(quoteToken, signature, approvalSignature, apiKey)

For a SIGNATURE-type ravn_execute result only: submit the signature(s) you collected (over typedData, and approvalData if present) to actually place the order. RAVN decodes the venue from quoteToken and routes to the right venue-specific submit path — you never touch a per-venue endpoint. Returns a statusRef — pass it to ravn_status as `ref` to poll this swap.

輸入結構描述

{
  "type": "object",
  "properties": {
    "quoteToken": {
      "type": "string",
      "description": "The quoteToken from ravn_quote"
    },
    "signature": {
      "type": "string",
      "pattern": "^0x[0-9a-fA-F]+$",
      "description": "Signature over the typedData from ravn_execute"
    },
    "approvalSignature": {
      "description": "0x Gasless only: signature over approvalData, when ravn_execute returned one",
      "type": "string",
      "pattern": "^0x[0-9a-fA-F]+$"
    },
    "apiKey": {
      "description": "Your RAVN API key, if you have one — raises your rate limit",
      "type": "string"
    }
  },
  "required": [
    "quoteToken",
    "signature"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}

輸出結構描述

{
  "type": "object",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "statusRef": {
              "type": "string",
              "description": "Pass to ravn_status as `ref` to poll this swap"
            },
            "venue": {
              "type": "string"
            }
          },
          "required": [
            "statusRef",
            "venue"
          ],
          "additionalProperties": false
        },
        "meta": {
          "type": "object",
          "properties": {
            "requestId": {
              "type": "string"
            },
            "version": {
              "type": "string"
            }
          },
          "required": [
            "requestId",
            "version"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "data",
        "meta"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "error": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string"
            },
            "message": {
              "type": "string"
            },
            "details": {}
          },
          "required": [
            "code",
            "message"
          ],
          "additionalProperties": false
        },
        "meta": {
          "type": "object",
          "properties": {
            "requestId": {
              "type": "string"
            },
            "version": {
              "type": "string"
            }
          },
          "required": [
            "requestId",
            "version"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "error",
        "meta"
      ],
      "additionalProperties": false
    }
  ]
}
🟢ravn_status(quoteToken, ref, apiKey)

Poll the status of a swap by its quoteToken and ref from ravn_execute (statusRef, deposit address, or origin tx hash). Use the quoteToken execute returned — compose rebinds hop 1 onto hop 2's deposit. Status is authoritative where the venue exposes it; a swap the venue can't track reports 'unknown' rather than a guess.

輸入結構描述

{
  "type": "object",
  "properties": {
    "quoteToken": {
      "type": "string",
      "description": "The quoteToken from ravn_quote — the venue is decoded from it"
    },
    "ref": {
      "type": "string",
      "description": "statusRef from ravn_execute when it returned one (always for DEPOSIT and SIGNATURE venues — it is the venue's own tracking key, which is not always the deposit address); otherwise the origin tx hash"
    },
    "apiKey": {
      "description": "Your RAVN API key, if you have one — raises your rate limit",
      "type": "string"
    }
  },
  "required": [
    "quoteToken",
    "ref"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}

輸出結構描述

{
  "type": "object",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "status": {
              "type": "string"
            },
            "venue": {
              "type": "string"
            },
            "venueStatus": {
              "type": "string"
            },
            "tracking": {
              "description": "Present instead of venueStatus when this venue has no live tracker yet",
              "type": "string",
              "const": "unavailable"
            },
            "deliveredAmount": {
              "description": "Actual delivered output, in the output token's smallest unit, when the venue exposes it",
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "txHash": {
              "description": "The destination-chain tx that paid the user out, when the venue names one. Only populated once status is terminal (success/refunded/failed), never while still in flight",
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "status",
            "venue"
          ],
          "additionalProperties": false
        },
        "meta": {
          "type": "object",
          "properties": {
            "requestId": {
              "type": "string"
            },
            "version": {
              "type": "string"
            }
          },
          "required": [
            "requestId",
            "version"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "data",
        "meta"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "error": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string"
            },
            "message": {
              "type": "string"
            },
            "details": {}
          },
          "required": [
            "code",
            "message"
          ],
          "additionalProperties": false
        },
        "meta": {
          "type": "object",
          "properties": {
            "requestId": {
              "type": "string"
            },
            "version": {
              "type": "string"
            }
          },
          "required": [
            "requestId",
            "version"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "error",
        "meta"
      ],
      "additionalProperties": false
    }
  ]
}
🟢ravn_health

Liveness check across every venue RAVN routes through — call before a swap if you want to know whether a route is degraded ahead of time.

輸入結構描述

{
  "type": "object",
  "properties": {},
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}

輸出結構描述

{
  "type": "object",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "enum": [
                "ok",
                "degraded"
              ]
            },
            "venues": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "healthy": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "id",
                  "name",
                  "healthy"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "status",
            "venues"
          ],
          "additionalProperties": false
        },
        "meta": {
          "type": "object",
          "properties": {
            "requestId": {
              "type": "string"
            },
            "version": {
              "type": "string"
            }
          },
          "required": [
            "requestId",
            "version"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "data",
        "meta"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "error": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string"
            },
            "message": {
              "type": "string"
            },
            "details": {}
          },
          "required": [
            "code",
            "message"
          ],
          "additionalProperties": false
        },
        "meta": {
          "type": "object",
          "properties": {
            "requestId": {
              "type": "string"
            },
            "version": {
              "type": "string"
            }
          },
          "required": [
            "requestId",
            "version"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "error",
        "meta"
      ],
      "additionalProperties": false
    }
  ]
}
🟢ravn_tokens(chainId, apiKey)

RAVN's own listed token registry for one chain — populate a token picker without hardcoding one. This is "what RAVN knows about and might route", not a per-pair routability guarantee for any specific pair; call ravn_quote to check that.

輸入結構描述

{
  "type": "object",
  "properties": {
    "chainId": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991,
      "description": "Numeric chain id, e.g. 1=Ethereum, 8453=Base, -1=Bitcoin, -2=Solana — see ravn_chains for the full list, or ravn_health for live venue status"
    },
    "apiKey": {
      "description": "Your RAVN API key, if you have one — raises your rate limit",
      "type": "string"
    }
  },
  "required": [
    "chainId"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}

輸出結構描述

{
  "type": "object",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "symbol": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "address": {
                "type": "string"
              },
              "decimals": {
                "type": "number"
              },
              "chainId": {
                "type": "number"
              },
              "isNative": {
                "type": "boolean"
              },
              "logoUrl": {
                "type": "string"
              }
            },
            "required": [
              "symbol",
              "name",
              "address",
              "decimals",
              "chainId",
              "isNative"
            ],
            "additionalProperties": false
          }
        },
        "meta": {
          "type": "object",
          "properties": {
            "requestId": {
              "type": "string"
            },
            "version": {
              "type": "string"
            }
          },
          "required": [
            "requestId",
            "version"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "data",
        "meta"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "error": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string"
            },
            "message": {
              "type": "string"
            },
            "details": {}
          },
          "required": [
            "code",
            "message"
          ],
          "additionalProperties": false
        },
        "meta": {
          "type": "object",
          "properties": {
            "requestId": {
              "type": "string"
            },
            "version": {
              "type": "string"
            }
          },
          "required": [
            "requestId",
            "version"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "error",
        "meta"
      ],
      "additionalProperties": false
    }
  ]
}
🟢ravn_tokens_resolve(chainId, address, apiKey)

Resolve an arbitrary token address to its metadata (symbol, name, decimals) via an on-chain read — for a paste-any-address flow, when the token isn't necessarily on ravn_tokens's list.

輸入結構描述

{
  "type": "object",
  "properties": {
    "chainId": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991,
      "description": "Numeric chain id, e.g. 1=Ethereum, 8453=Base, -1=Bitcoin, -2=Solana — see ravn_chains for the full list, or ravn_health for live venue status"
    },
    "address": {
      "type": "string",
      "description": "Token contract address / mint to resolve"
    },
    "apiKey": {
      "description": "Your RAVN API key, if you have one — raises your rate limit",
      "type": "string"
    }
  },
  "required": [
    "chainId",
    "address"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}

輸出結構描述

{
  "type": "object",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "token": {
              "type": "object",
              "properties": {
                "symbol": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "address": {
                  "type": "string"
                },
                "decimals": {
                  "type": "number"
                },
                "chainId": {
                  "type": "number"
                },
                "isNative": {
                  "type": "boolean"
                },
                "logoUrl": {
                  "type": "string"
                }
              },
              "required": [
                "symbol",
                "name",
                "address",
                "decimals",
                "chainId",
                "isNative"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "token"
          ],
          "additionalProperties": false
        },
        "meta": {
          "type": "object",
          "properties": {
            "requestId": {
              "type": "string"
            },
            "version": {
              "type": "string"
            }
          },
          "required": [
            "requestId",
            "version"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "data",
        "meta"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "error": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string"
            },
            "message": {
              "type": "string"
            },
            "details": {}
          },
          "required": [
            "code",
            "message"
          ],
          "additionalProperties": false
        },
        "meta": {
          "type": "object",
          "properties": {
            "requestId": {
              "type": "string"
            },
            "version": {
              "type": "string"
            }
          },
          "required": [
            "requestId",
            "version"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "error",
        "meta"
      ],
      "additionalProperties": false
    }
  ]
}
🟢ravn_btc_coverage(chainId, apiKey)

For a swap where native BTC is the source, not every token on the destination chain is reachable. Returns which of ravn_tokens's list on `chainId` a BTC venue can actually route to, and how many venues serve each, so you can build a token list that matches what will really quote instead of discovering it one NO_LIQUIDITY at a time. BTC-as-source only — selling a token INTO BTC isn't restricted the same way (nearly any token can be sold into BTC), so this has nothing useful to say about that direction.

輸入結構描述

{
  "type": "object",
  "properties": {
    "chainId": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991,
      "description": "The destination chain to check BTC-source coverage on"
    },
    "apiKey": {
      "description": "Your RAVN API key, if you have one — raises your rate limit",
      "type": "string"
    }
  },
  "required": [
    "chainId"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}

輸出結構描述

{
  "type": "object",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "chainId": {
              "type": "number",
              "description": "Echoes the requested chain"
            },
            "filtered": {
              "type": "boolean",
              "description": "False means the upstream venue lists couldn't be reached right now — coverage is empty and the answer is unknown, not 'nothing routes'. Treat like an outage: don't filter your token list on it"
            },
            "coverage": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "number"
              },
              "description": "Lowercased token address to the number of BTC venues (1-3) that route to it from native Bitcoin. Tokens no venue serves are omitted, not listed at 0"
            }
          },
          "required": [
            "chainId",
            "filtered",
            "coverage"
          ],
          "additionalProperties": false
        },
        "meta": {
          "type": "object",
          "properties": {
            "requestId": {
              "type": "string"
            },
            "version": {
              "type": "string"
            }
          },
          "required": [
            "requestId",
            "version"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "data",
        "meta"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "error": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string"
            },
            "message": {
              "type": "string"
            },
            "details": {}
          },
          "required": [
            "code",
            "message"
          ],
          "additionalProperties": false
        },
        "meta": {
          "type": "object",
          "properties": {
            "requestId": {
              "type": "string"
            },
            "version": {
              "type": "string"
            }
          },
          "required": [
            "requestId",
            "version"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "error",
        "meta"
      ],
      "additionalProperties": false
    }
  ]
}
🟢ravn_chains(apiKey)

Every chain RAVN lists a token registry for (see ravn_tokens). Static, doesn't change per request, safe to cache instead of hardcoding a chain table.

輸入結構描述

{
  "type": "object",
  "properties": {
    "apiKey": {
      "description": "Your RAVN API key, if you have one — raises your rate limit",
      "type": "string"
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}

輸出結構描述

{
  "type": "object",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "chainId": {
                "type": "number"
              },
              "name": {
                "type": "string"
              },
              "shortName": {
                "type": "string"
              },
              "nativeCurrency": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "symbol": {
                    "type": "string"
                  },
                  "decimals": {
                    "type": "number"
                  }
                },
                "required": [
                  "name",
                  "symbol",
                  "decimals"
                ],
                "additionalProperties": false
              },
              "explorerUrl": {
                "type": "string"
              },
              "logoUrl": {
                "type": "string"
              }
            },
            "required": [
              "chainId",
              "name",
              "shortName",
              "nativeCurrency",
              "explorerUrl"
            ],
            "additionalProperties": false
          }
        },
        "meta": {
          "type": "object",
          "properties": {
            "requestId": {
              "type": "string"
            },
            "version": {
              "type": "string"
            }
          },
          "required": [
            "requestId",
            "version"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "data",
        "meta"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "error": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string"
            },
            "message": {
              "type": "string"
            },
            "details": {}
          },
          "required": [
            "code",
            "message"
          ],
          "additionalProperties": false
        },
        "meta": {
          "type": "object",
          "properties": {
            "requestId": {
              "type": "string"
            },
            "version": {
              "type": "string"
            }
          },
          "required": [
            "requestId",
            "version"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "error",
        "meta"
      ],
      "additionalProperties": false
    }
  ]
}
🟢ravn_btc_prepare_send(fromAddress, toAddress, amountSats, feeRateSatsPerVb, network)

Turns a DEPOSIT-type ravn_execute result (depositAddress + depositAmount) into a ready-to-sign PSBT, so you don't have to write your own UTXO selection and fee-estimation code. Fetches your UTXOs and the current network fee rate from mempool.space (public, no auth). RAVN never sees or touches a private key — sign the returned PSBT with your own wallet and broadcast it yourself. Only one signer is ever needed (unlike PSBT flows that require coordinating signatures across multiple UTXO-holding wallets), because every RAVN BTC-source venue resolves to a plain single-recipient payment.

輸入結構描述

{
  "type": "object",
  "properties": {
    "fromAddress": {
      "type": "string",
      "description": "Your Bitcoin address holding the UTXOs to spend — native SegWit (bc1q…) or Taproot (bc1p…) only"
    },
    "toAddress": {
      "type": "string",
      "description": "depositAddress from ravn_execute"
    },
    "amountSats": {
      "type": "string",
      "description": "depositAmount from ravn_execute, in satoshis"
    },
    "feeRateSatsPerVb": {
      "description": "Omit to use mempool.space's current halfHourFee estimate",
      "type": "number",
      "exclusiveMinimum": 0
    },
    "network": {
      "description": "Defaults to mainnet",
      "type": "string",
      "enum": [
        "mainnet",
        "testnet"
      ]
    }
  },
  "required": [
    "fromAddress",
    "toAddress",
    "amountSats"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}

輸出結構描述

{
  "type": "object",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "error": {
          "type": "string"
        }
      },
      "required": [
        "error"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "psbtBase64": {
          "type": "string"
        },
        "inputCount": {
          "type": "number"
        },
        "totalInputSats": {
          "type": "string"
        },
        "feeRateSatsPerVb": {
          "type": "number"
        },
        "estimatedFeeSats": {
          "type": "string"
        },
        "changeSats": {
          "type": "string"
        }
      },
      "required": [
        "psbtBase64",
        "inputCount",
        "totalInputSats",
        "feeRateSatsPerVb",
        "estimatedFeeSats",
        "changeSats"
      ],
      "additionalProperties": false
    }
  ]
}

社群

為此伺服器評分

證據

近期觀測

已驗證未記錄版本10 個工具
已驗證未記錄版本10 個工具
已驗證未記錄版本10 個工具