Olmeca DEX
  • Bienvenido a Olmeca Relay API
  • Iniciando
    • Get Data
  • Nodos
    • Nodos
  • API
    • Mercados
    • Ordenes
    • Tokens
    • WebSockets
    • Changelog
  • Trade API
    • Trade API
Powered by GitBook
On this page
  • List Markets
  • Get Market
  • Get Market Ticker
  • Get Market Stats
  • Get Market History
  • List Market Fills
  • List Market Candles
  • Get Market Book

Was this helpful?

  1. API

Mercados

List Markets

GET https://api.olmecarelay.com/v3/markets/

Get all available markets.

Query Parameters

Name
Type
Description

ids

string

Comma-separated list of market ids in the format of {base}-{quote}. e.g. ZRX-WETH, DAI-WETH

sort

string

Whether to sort the markets by activity ('active') or alphabetically ('name').

type

string

Filter results by market type. Currently, the only valid option is "SHORT', though additional market types may be added in the future.

include

string

Comma-separated list specifying which parts of the RadarMarket schema to include in the response. Valid options include 'base', 'ticker', 'stats', and 'history'. e.g. base,ticker,stats,history

quoteTokenAddress

string

Returns the results for the specified quote token address.

search

string

A search term to filter results by market name or base token name.

page

integer

Page of markets to retrieve. Defaults to 1.

perPage

integer

Number of markets to retrieve per page. Defaults to 20.

[
  {
    "id": string,
    "ticker": RadarTicker,
    "stats": RadarStats,
    "history": RadarHistory
  }
]
Unknown error occurred

Get Market

GET https://api.olmecarelay.com/v3/markets/{marketId}

Return data for a single market.

Path Parameters

Name
Type
Description

marketId

string

Market ID in the format of {base}-{quote} e.g. ZRX-WETH

Query Parameters

Name
Type
Description

include

string

Comma-separated list specifying which parts of the RadarMarket Schema to include in the response. Valid options include 'base', 'ticker', 'stats', and 'history'. e.g. base,ticker,stats,history

{
  "id": string,
  "ticker": RadarTicker,
  "stats": RadarStats,
  "history": RadarHistory
}
Unknown error occurred
Market not found

Get Market Ticker

GET https://api.olmecarelay.com/v3/markets/{marketId}/ticker

Return ticker data for a single market

Path Parameters

Name
Type
Description

marketId

string

Market id in the format of {base}-{quote}. e.g. ZRX-WETH

{
  "transactionHash": string,
  "price": BigNumber,
  "size": BigNumber,
  "timestamp": BigNumber, // unix
  "bestBid": BigNumber,
  "bestAsk": BigNumber,
  "spreadPercentage": BigNumber
}
Unknown error occured
Market not found

Get Market Stats

GET https://api.olmecarelay.com/v3/markets/{marketId}/stats

Get the stats for the specified market.

Path Parameters

Name
Type
Description

marketId

string

Market id in the format of {base}-{quote}. e.g. ZRX-WETH

{
  "numBidsWithinRange": number,
  "numAsksWithinRange": number,
  "baseTokenAvailable": BigNumber,
  "quoteTokenAvailable": BigNumber,
  "volume24Hour": BigNumber,
  "percentChange24Hour": BigNumber
}
Unknown error occured
Market not found

Get Market History

GET https://api.olmecarelay.com/v3/markets/{marketId}/history

Get the history for the specified market.

Path Parameters

Name
Type
Description

marketId

string

Market id in the format of {base}-{quote}. e.g. ZRX-WETH

{
  "price24Hour": BigNumber[]
}
Unknown error occured
Market not found

List Market Fills

GET https://api.olmecarelay.com/v3/markets/{marketId}/fills

Return a paginated list of market fills sorted by fill date.

Path Parameters

Name
Type
Description

marketId

string

Market id in the format of {base}-{quote}. e.g. ZRX-WETH

Query Parameters

Name
Type
Description

page

integer

Page of fills to retrieve. Defaults to 1.

perPage

integer

Number of fills to retrieve per page. Defaults to 20.

[
  {
    "transactionHash": string,
    "type": UserOrderType,
    "blockNumber": number,
    "makerAddress": string,
    "takerAddress": string,
    "baseTokenAddress": string;
    "quoteTokenAddress": string;
    "feeRecipientAddress": string;
    "makerFeePaid": BigNumber,
    "takerFeePaid": BigNumber,
    "makerFeeTokenAddress": string;
    "takerFeeTokenAddress": string;
    "filledBaseTokenAmount": BigNumber,
    "filledQuoteTokenAmount": BigNumber,
    "orderHash": string,
    "timestamp": number,
    "outlier": boolean
  }
]
Unknown error occured
Market not found

List Market Candles

GET https://api.olmecarelay.com/v3/markets/{marketId}/candles

Path Parameters

Name
Type
Description

marketId

string

Market id in the format of {base}-{quote}. e.g. ZRX-WETH

Query Parameters

Name
Type
Description

to

integer

Unix timestamp to narrow the end time for candle data.

from

integer

Unix timestamp to narrow the start time for candle data.

[
  {
    "open": BigNumber,
    "high": BigNumber,
    "low": BigNumber,
    "close": BigNumber,
    "startBlock": number,
    "startBlockTimestamp": number,
    "endBlock": number,
    "endBlockTimestamp": number,
    "baseTokenVolume": BigNumber,
    "quoteTokenVolume": BigNumber
  }
]
Unknown error occured
Market not found

Get Market Book

GET https://api.olmecarelay.com/v3/markets/{marketId}/book

Return a book containing bids / asks for a market.

Path Parameters

Name
Type
Description

marketId

string

Market id in t

PreviousNodosNextOrdenes

Last updated 5 years ago

Was this helpful?