Skip to content
Docs
Actions
Requesting for Quote

Requesting for Quote

aori_requestQuote

Supposing that a current swap pair or market doesn't have limit orders within it, a potential taker should not be forced to make a limit order as this requires complete price awareness from them to choose a price that won't be arbitraged against.

This method allows a potential taker to ping their intent to sell inputAmount of token inputToken for outputToken on chain with a chain id of chainId.

This will be visible to clients subscribed to the Subscriptions stream for which they can then start placing limit orders ready for the taker to take.

ParametersTypeRequiredDescription
inputTokenstringYesAddress of Input Token e.g 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984 for Uniswap
outputTokenstringYesAddress of Output Token e.g 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984 for Uniswap
inputAmountstringYesStringified integer representing amount of input token.
chainIdnumberYesInteger representing chain id that input token exists on e.g 1 for Ethereum Mainnet
apiKeystringYesAPI key (see Authentication)
This call should be made to https://taker.aori.io or https://dev.taker.aori.io. See cURL example below.
 {
   "id": <request_id>,
   "jsonrpc": "2.0",
   "method": "aori_requestQuote",
   "params": [{
       "inputToken": <string>,
       "outputToken": <string>,
       "inputAmount": <number>,
       "chainId": <number>,
       "apiKey": "..."
     }
   }]
 }

Response

{
  "id": <request_id>,
  "result": "Ok"
}

Related Streaming Events

{
    "id": null,
    "result": {
        "type": "QuoteRequested",
        "data": {
            "inputToken": <string>,
            "outputToken": <string>,
            "inputAmount": <number>,
            "chainId": <number>
        }
    }
}

aori_requestSwap

At times, market makers would like more confidence that the market taker has sufficient liquidity to execute a swap. This method allows a potential taker to ping their intent to sell inputAmount of token inputToken for outputToken on chain with a chain id of chainId.

This will be visible to clients subscribed to the Subscriptions stream for which they can then start placing limit orders ready for the taker to take, but under a different event SwapRequested.

ParametersTypeRequiredDescription
orderLimit OrderYesLimit order to make. See Limit Order format
signaturestringYesA signature by the user of the limit order.
apiKeystringYesAPI key (see Authentication)
This call should be made to https://taker.aori.io or https://dev.taker.aori.io. See cURL example below.
 {
   "id": <request_id>,
   "jsonrpc": "2.0",
   "method": "aori_requestSwap",
   "params": [{
       "order": <order>,
       "signature": <signature>,
       "apiKey": "..."
     }]
 }

Response

{
  "id": <request_id>,
  "result": "Ok"
}

Related Streaming Events

{
    "id": null,
    "result": {
        "type": "SwapRequested",
        "data": <order> // See Limit Order object
    }
}