API
Base URL: https://api.metric.xyz
Where the API runs
The API backend runs on AWS in Tokyo (ap-northeast-1), across three availability zones. Requests reach it through Cloudflare, so they enter at the Cloudflare edge nearest to you. For the lowest latency, run your client in or near ap-northeast-1.
Authentication
The maker quote endpoint requires a Bearer token:
{% code overflow="wrap" %}
Authorization: Bearer <your_trading_api_key>
{% endcode %}
{% hint style="info" %} Trading API keys are issued by the Relatick team. Email hello@relatick.xyz or message Relatick on X to request one. {% endhint %}
Public endpoints (chains, metadata, routing, single-pool and batch bid/ask) require no authentication. On routing and bid/ask, a key is optional: it raises your rate limit.
{% hint style="warning" %} If you send an Authorization header to a public endpoint, the key must be valid. An unknown or placeholder key returns 401 {"error": "Invalid API key"} even where no key is needed. Leave the header out if you don't have a key. {% endhint %}
***
Supported chains
Retrieve the list of supported chains and their numeric EVM chain IDs:
{% code overflow="wrap" %}
GET /public/v1/chains
{% endcode %}
Use the returned chainId values as the {chain_id} path parameter in all chain-specific endpoints.
Last updated 29 days ago
Relatick