All pages
Powered by GitBook
1 of 2

Loading...

Loading...

Developer Endpoints

Feel free to use these endpoints to build on Rujira!

Stay updated with health checks and notifications through our Discord.

Detailed documentation is available in the THORChain Dev Docs.


THORChain Public Endpoints

Mainnet

  • RPC:

Stagenet

  • RPC:

  • gRPC:

  • Midgard REST API:


Rujira Ecosystem APIs

GraphQL API

High-performance API for extensive data across the Rujira ecosystem:

  • Mainnet:

  • Stagenet:

  • Docs: Embedded inside the above links.

  • API key: Email [email protected] to request an API key.

For GraphQL subscriptions and real-time data streaming, use a Phoenix Socket-based connection instead of HTTP. This ensures low-latency, bidirectional communication with Rujira’s endpoints. A working example is available , which:

  • Initializes a Phoenix Socket instance (PhoenixSocket from phoenix).

  • Wraps it with @absinthe/socket for Relay-compatible GraphQL subscriptions.

  • Includes fallback compatibility fixes for outdated libraries.

REST API

For RUJI Trade DEX and RUJI token supply integrations:

  • Mainnet: ,

  • Stagenet: ,

  • Docs:

For a more comprehensive solution, use our .


Endpoint Testing

RPC/API Endpoints:

gRPC Endpoints:

gRPC:

  • https://grpc-thorchain.rorcual.xyz

  • https://thorchain.ibs.team:443

  • RPC REST API:

    • https://api-thorchain.rorcual.xyz

    • https://thorchain.ibs.team/api/

  • Midgard REST API: midgard.ninerealms.com

  • https://rpc.ninerealms.com
    https://rpc-thorchain.rorcual.xyz
    https://thorchain.ibs.team/rpc/
    stagenet-rpc.ninerealms.com
    stagenet-grpc.ninerealms.com:443
    stagenet-midgard.ninerealms.com
    api.rujira.network/api/graphiql
    https://api-preview.rujira.network/api/graphiql
    here
    Trade
    RUJI
    Trade
    RUJI
    Rujira's REST API
    GraphQL API
    curl -X GET https://<endpoint>/status
    grpcurl <grpc-endpoint> list

    Rujira REST API

    Introduction

    This document outlines the REST API endpoints available for RUJI Trade orderbook DEX and RUJI token supply, to be used by integrating partners such as CoinGecko and CoinMarketCap.

    If you need a more complete, higher performance API, we recommend using our GraphQL API available here: https://api.rujira.network/api/graphiql.

    General API Information

    • The base endpoints are available at

    • Responses are provided in JSON format.

    • Data is returned in descending order. Newest first, oldest last.

    • All time and timestamp related fields in the JSON responses are in milliseconds.

    RUJI Trade Orderbook DEX

    Endpoints Overview

    No.
    Endpoint
    Description

    Endpoint 1: /trade/tickers (Market Info)

    The endpoint provides 24-hour pricing and volume information on each market pair available on RUJI Trade DEX.

    Example response

    /trade/tickers endpoint response description:

    Name
    Data Type
    Description

    Endpoint 2: /trade/orderbook (Orderbook depth details)

    The trade/orderbook/ticker_id endpoint provides orderbook information for a given market pair/ticker.

    Endpoint parameters:

    Name
    Type
    Mandatory
    Description

    Example query:

    Example response

    /trade/orderbook response descriptions:

    Name
    Data Type
    Description

    Endpoint 3: /trade/historical_trades (Historical Data)

    The /trade/historical_trades/ticker_id endpoint is used to return data on historical completed trades for a given market pair.

    Endpoint parameters:

    Name
    Data Type
    Mandatory
    Description

    Example query:

    Example response

    /trade/historical_trades response descriptions:

    Name
    Data Type
    Description

    RUJI Token Supply

    The /ruji/* endpoints are used to return data on the RUJI token supply.

    No.
    Endpoint
    Description

    Example query:

    Timestamp parameters (e.g. start_time, end_time) must be passed in milliseconds.

  • The API has a dynamic rate limit set by Cloudflare to prevent spamming.

  • base_volume

    decimal

    24 hour trading volume for the pair (unit in base)

    target_volume

    decimal

    24 hour trading volume for the pair (unit in target)

    pair_id

    string

    Contract address for the pair

    bid

    decimal

    Current highest bid price

    ask

    decimal

    Current lowest ask price

    start_time

    date

    No

    Start time from which to query historical trades from

    end_time

    date

    No

    End time for historical trades query

    trade_timestamp

    timestamp

    Unix timestamp in milliseconds for when the transaction occurred.

    type

    string

    Used to determine the type of the transaction that was completed.

    Buy – Identifies an ask that was removed from the order book.

    Sell – Identifies a bid that was removed from the order book.

    1.

    /trade/tickers

    Market related statistics for all markets for the last 24 hours.

    2.

    /trade/orderbook

    Order book depth of any given trading pair, split into two different arrays for bid and ask orders.

    3.

    /trade/historical_trades

    Historical trade data for any given trading pair.

    [

    {

    "ticker_id": "TCY_RUNE",

    "base_currency": "TCY",

    "target_currency": "RUNE",

    "last_price": "0.24",

    "base_volume": 0,

    "target_volume": 0,

    "pair_id": "thor12ds7fxj5g47jwzfzvzzhzxxd3cp6v55flgwxva0803r8k5mzm44skth6wa",

    "bid": "0.186",

    "ask": "0.22"

    }

    ]

    ticker_id

    string

    Identifier of a ticker with delimiter to separate base/target, e.g. BTC_ETH

    base_currency

    string

    Symbol/Currency code/Contract Address of a the base cryptoasset, e.g. BTC

    target_currency

    string

    Symbol/Currency code/Contract Address of the target cryptoasset, e.g. ETH (Contract address for DEX)

    last_price

    decimal

    Last transacted price of base currency based on given target currency e.g.

    1 base = X target

    ticker_id

    string

    Yes

    A ticker such as "BTC_ETH", with delimiter between different cryptoassets

    depth

    integer

    No

    Orders depth quantity: [0, 100, 200, 500...]. 0 returns full depth. Depth = 100 means 50 for each bid/ask side.

    {

    "ticker_id": "BTC_USDC",

    "asks": [

    [

    "116329",

    "0.00157858"

    ]

    ],

    "bids": [

    [

    "115400",

    "182.89939237"

    ]

    ]

    }

    ticker_id

    string

    A pair such as "BTC_ETH", with delimiter between different cryptoassets

    bids

    decimal

    An array containing 2 elements. The offer price and quantity for each bid order

    asks

    decimal

    An array containing 2 elements. The ask price and quantity for each ask order

    ticker_id

    string

    Yes

    A pair such as "BTC_ETH", with delimiter between different cryptoassets

    type

    string

    No

    To indicate nature of trade - buy/sell

    limit

    integer

    No

    [

    {

    "trade_id": 21230,

    "price": "116659.0",

    "base_volume": "0.00128579",

    "target_volume": "150",

    "trade_timestamp": 1754571399738,

    "type": "buy"

    },

    {

    "trade_id": 21101,

    "price": "115271.58095761736",

    "base_volume": "0.00000868",

    "target_volume": "1",

    "trade_timestamp": 1754546289060,

    "type": "sell"

    }

    ]

    trade_id

    integer

    A unique ID associated with the trade for the currency pair transaction

    price

    decimal

    Transaction price of base asset in target currency.

    base_volume

    decimal

    Transaction amount in base pair volume.

    target_volume

    decimal

    Transaction amount in target pair volume.

    1.

    /ruji/holders

    Top 100 wallets/holders of the RUJI token.

    2.

    /ruji/total_supply

    Total RUJI supply.

    3.

    /ruji/circulating_supply

    Current RUJI circulating supply. Calculated as total supply minus currently vesting supply.

    https://api.rujira.network/api/
    https://api.rujira.network/api/trade/tickers
    https://api.rujira.network/api/trade/orderbook?ticker_id=BTC_USDC&depth=100
    https://api.rujira.network/api/trade/historical_trades?ticker_id=BTC_USDC&limit=10
    https://api.rujira.network/api/ruji/holders

    Number of historical trades to retrieve from time of query. [0, 200, 500...]. 0 returns full history.