POST
curl --request POST \
  --url https://rpc.quai.network/cyprus1/ \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "method": "quai_quaiRateAtBlock",
  "params": [
    "0x7530",
    "0xA98AC7"
  ],
  "id": 1
}'
{
  "jsonrpc": "2.0",
  "result": "0x3f28cb71571c7",
  "id": 1
}

Body

application/json
jsonrpc
enum<string>
required
Available options:
2.0
Example:

"2.0"

method
enum<string>
required

The name of the method to be invoked.

Available options:
quai_quaiRateAtBlock
Example:

"quai_quaiRateAtBlock"

params
string[]
required

The block parameter and the amount of Quai to return the rate for.

Example:
["0x7530", "0xA98AC7"]
id
integer
required

A unique identifier for the request.

Example:

1

Response

200 - application/json
Successful response
jsonrpc
string
Example:

"2.0"

result
string

The amount of Qi tokens the given amount of Quai can be converted to at the given block.

Example:

"0x3f28cb71571c7"

id
integer
Example:

1