RADAR RELAY V2

We’ve updated to 0x V2.See what changed.

Radar Relay Trade API

The Trade API is a series of REST endpoints used for interactions that may involve messages and transactions that have been signed with your Ethereum private key. You will need a local Ethereum wallet to manage these interactions, and the wallet must have a connection to the Ethereum network in order to submit transactions.

API Endpoint

https://api.radarrelay.com/v0

Orders

REST endpoints for signed order data

Submit Order

Submit a SignedOrder to place it on the books

HTTP Request

POST https://api.radarrelay.com/v0/orders

Parameters

SignedOrder

(body)

0x SignedOrder object

Example Request

$ curl https://api.radarrelay.com/v0/orders \
  -H "Content-Type: application/json" \
  -X POST \  
  -d \
   '{
      "exchangeContractAddress": "0xffffffffffffffffffffffffffffffffffffffff",
      "expirationUnixTimestampSec": "1527115521",
      "maker": "0xffffffffffffffffffffffffffffffffffffffff",
      "ecSignature": {
        "v": 27,
        "r": "0x396a20a0589a7b9189f0d90ad377d7fd32d25d380402dc85954c227391fcc1c1",
        "s": "0x1965690d845e9842ba46ac5a335567bb45e0a7353da9826d8932807280dfef6a"
      },
      "feeRecipient": "0xffffffffffffffffffffffffffffffffffffffff",
      "makerFee": "0",
      "makerTokenAddress": "0xffffffffffffffffffffffffffffffffffffffff",
      "makerTokenAmount": "20000000000000000",
      "salt": "40805107183322694453425342424882069757565825927374261816416779975999422938081",
      "taker": "0x0000000000000000000000000000000000000000",
      "takerFee": "0",
      "takerTokenAddress": "0xffffffffffffffffffffffffffffffffffffffff",
      "takerTokenAmount": "1000000000000000000"
    }'

Response [201]

Order created

Response [400]

Invalid input

Markets

REST endpoints for limit / market orders

Limit Order Request

Submit a limit order request to receive an UnsignedOrder. The Unsigned order will contain parameters that need to be changed, then signed before being posted to the /orders endpoint.

HTTP Request

POST https://api.radarrelay.com/v0/markets/{marketId}/order/limit

Parameters

marketId
string
(path)

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

#RadarLimitOrder

(body)

Example Request

$ curl https://api.radarrelay.com/v0/markets/{marketId}/order/limit \
  -H "Content-Type: application/json" \
  -X POST \
  -d \
  '{
    "type": UserOrderType,
    "quantity": BigNumber,
    "price": BigNumber
  }'

Response [200]

See: $UnsignedOrder
{
  "maker": string,
  "taker": string,
  "makerFee": BigNumber,
  "takerFee": BigNumber,
  "makerTokenAmount": BigNumber,
  "takerTokenAmount": BigNumber,
  "makerTokenAddress": string,
  "takerTokenAddress": string,
  "salt": BigNumber,
  "exchangeContractAddress": string,
  "feeRecipient": string,
  "expirationUnixTimestampSec": BigNumber,
  "ecSignature" : '{SET}'
}

Response [400]

Error occured

Response [404]

Market not found

Market Order Request

Submit a market order request to receive a list of orders required to fulfill a market order.

HTTP Request

POST https://api.radarrelay.com/v0/markets/{marketId}/order/market

Parameters

marketId
string
(path)

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

#RadarMarketOrder

(body)

Example Request

$ curl https://api.radarrelay.com/v0/markets/{marketId}/order/market \
  -H "Content-Type: application/json" \
  -X POST \
  -d \
  '{
    "type": UserOrderType,
    "quantity": BigNumber
  }'

Response [200]

See: $RadarMarketOrderResponse
{
  "averagePrice": BigNumber,
  "bestPrice": BigNumber,
  "worstPrice": BigNumber,
  "spread": BigNumber,
  "orders": SignedOrder[]
}

Response [400]

Error occured

Response [404]

Market not found

Accounts

REST endpoints for retrieving account information

List Account Fills

Return a list of account fills

HTTP Request

GET https://api.radarrelay.com/v0/accounts/{accountAddress}/fills

Parameters

accountAddress
string
(path)

Account address (ethereum address)

Example Request

$ curl https://api.radarrelay.com/v0/accounts/{accountAddress}/fills

Response [200]

See: $RadarFill
[
  {
    "transactionHash": string, // last trade tx hash
    "price": BigNumber, // last trade price
    "size": BigNumber, // last trade size (in quote)
    "bid": BigNumber, // best bid
    "ask": BigNumber, // best ask
    "volume": BigNumber, // 24hr volume of market in quote
    "timestamp": BigNumber // last trade time in unix time (seconds)
  }
]

Response [400]

Error message

Response [404]

Account not found

List Account Orders

Get a list of account orders

HTTP Request

GET https://api.radarrelay.com/v0/accounts/{accountAddress}/orders

Parameters

accountAddress
string
(path)

Account address (ethereum address)

Example Request

$ curl https://api.radarrelay.com/v0/accounts/{accountAddress}/orders

Response [200]

See: $RadarSignedOrder
[
  {
    "orderHash": string;
    "type": RadarOrderType
    "state": RadarOrderState
    "baseTokenAddress": string,
    "quoteTokenAddress": string,
    "remainingBaseTokenAmount": BigNumber,
    "remainingQuoteTokenAmount": BigNumber,
    "price": BigNumber,
    "createdDate": BigNumber,
    "signedOrder": SignedOrder,
  }
]

Response [400]

Error message

Response [404]

Account not found