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

请求体

application/json
jsonrpc
enum<string>
必填
可用选项:
2.0
示例:

"2.0"

method
enum<string>
必填

The name of the method to be invoked.

可用选项:
quai_quaiToQi
示例:

"quai_quaiToQi"

params
string[]
必填

The amount of Quai in Wei to return the expected Qi on conversion for and the block number.

Required array length: 2 elements
示例:
["0x7530", "0xA98AC7"]
id
integer
必填

A unique identifier for the request.

示例:

1

响应

200 - application/json

Successful response

jsonrpc
string
示例:

"2.0"

result
string

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

示例:

"0x3f28cb71571c7"

id
integer
示例:

1