LogoLogo
  • Introduction
  • Understanding Rujira History
    • Rujira & Kujira
    • Rujira & THORChain
    • Rujira & Levana
  • Understanding RUJI Token
  • HOW IT WORKS
    • Understanding the App Layer
    • Understanding Secured Assets
    • Understanding App Layer Security
    • Frequently Asked Questions
  • Developers
    • Getting Started
      • Licenses
    • Development Process
    • Local Deployment Guide
    • Stagenet Deployment Guide
    • Review and Audit Guide
    • Setting Up a THORChain Multisig
    • Mainnet Deployment Guide
    • Developer Endpoints
      • Rujira REST API
  • Core Products
    • RUJI Trade
    • RUJI Pools
      • Base Layer Arbitrage Strategy
    • RUJI Perps
      • Position size versus locked collateral
    • RUJI Lending
    • RUJI Liquidations
    • RUJI Launchpad
    • RUJI Options
    • RUJI Collections (Gojira)
  • Strategies
  • Ecosystem Products
    • RUJI Index
  • TCY AutoCompounder
  • Resources
    • Branding
    • Audits
    • Discord (for Devs)
    • Telegram (for Community)
Powered by GitBook
On this page
  • Introduction
  • RUJI Trade Orderbook DEX
  • RUJI Token Supply
Export as PDF
  1. Developers
  2. Developer Endpoints

Rujira REST API

PreviousDeveloper EndpointsNextRUJI Trade

Last updated 8 days ago

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: .

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.

  • 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.

RUJI Trade Orderbook DEX

Endpoints Overview

No.
Endpoint
Description

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.

Endpoint 1: /trade/tickers (Market Info)

Example response

[

{

"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"

}

]

/trade/tickers endpoint response description:

Name
Data Type
Description

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

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

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

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.

Example response

{

"ticker_id": "AUTO_USDC.ETH",

"bids": [

[

"0.0195596",

"48.95955141"

]

],

"asks": [

[

"0.019717",

"2493.08114263"

]

]

}

/trade/orderbook response descriptions:

Name
Data Type
Description

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

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

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

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

start_time

date

No

Start time from which to query historical trades from

end_time

date

No

End time for historical trades query

Example response

[

{

"trade_id": 1281,

"price": "0.0196522",

"base_volume": "2000",

"target_volume": "39.30446182",

"trade_timestamp": 1749130817397,

"type": "sell"

},

{

"trade_id": 1234,

"price": "0.0198046",

"base_volume": "357.28503093",

"target_volume": "7.07586488",

"trade_timestamp": 1749076081082,

"type": "buy"

}

]

/trade/historical_trades response descriptions:

Name
Data Type
Description

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.

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.

RUJI Token Supply

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

No.
Endpoint
Description

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.

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

Example query:

Example query:

Example query:

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