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/v2

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/v2/orders

Parameters

SignedOrder

(body)

0x SignedOrder object

Example Request

$ curl https://api.radarrelay.com/v2/orders \
  -H "Content-Type: application/json" \
  -X POST \  
  -d \
   '{
      "exchangeAddress": "0xffffffffffffffffffffffffffffffffffffffff",
      "expirationTimeSeconds": "1527115521",
      "senderAddress": "0xffffffffffffffffffffffffffffffffffffffff",
      "makerFee": "0",
      "makerAddress": "0xffffffffffffffffffffffffffffffffffffffff",
      "makerAssetAmount": "20000000000000000",
      "takerFee": "0",
      "takerAddress": "0xffffffffffffffffffffffffffffffffffffffff",
      "takerAssetAmount": "1000000000000000000",
      "salt": "1537458889693", // Current timestamp in milliseconds
      "feeRecipientAddress": "0x0000000000000000000000000000000000000000",
      "signature": "0x396a20a0589a7b9189f0d90ad377d7fd32d25d380402dc85954c227391fcc1c1"
    }'

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/v2/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/v2/markets/{marketId}/order/limit \
  -H "Content-Type: application/json" \
  -X POST \
  -d \
  '{
    "type": UserOrderType,
    "quantity": BigNumber,
    "price": BigNumber,
    "expiration": BigNumber
  }'

Response [200]

See: $UnsignedOrder
{
  "senderAddress": string,
  "makerAddress": "SET",
  "takerAddress": string,
  "makerFee": BigNumber,
  "takerFee": BigNumber,
  "makerAssetAmount": BigNumber,
  "takerAssetAmount": BigNumber,
  "makerAssetData": string,
  "takerAssetData": string,
  "salt": BigNumber, // Current timestamp in milliseconds
  "exchangeAddress": string,
  "feeRecipientAddress": string,
  "expirationTimeSeconds": BigNumber,
  "signature": "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/v2/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/v2/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/v2/accounts/{accountAddress}/fills

Parameters

accountAddress
string
(path)

Account address (ethereum address).

Example Request

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

Response [200]

See: $RadarFill
[
  {
    "baseTokenAddress": string,
    "quoteTokenAddress": string,
    "transactionHash": string,
    "type": UserOrderType,
    "blockNumber": number,
    "makerAddress": string,
    "takerAddress": string,
    "feeRecipientAddress": string,
    "makerFeePaid": BigNumber,
    "takerFeePaid": BigNumber,
    "filledBaseTokenAmount": BigNumber,
    "filledQuoteTokenAmount": BigNumber,
    "orderHash": string,
    "timestamp": number,
    "outlier": boolean
  }
]

Response [400]

Unknown error occured

Response [404]

Account not found

List Account Orders

Get a list of account orders

HTTP Request

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

Parameters

accountAddress
string
(path)

Account address (ethereum address).

Example Request

$ curl https://api.radarrelay.com/v2/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]

Unknown error occured

Response [404]

Account not found