Wallet API creates a wallet, and gets the wallet information and its balance.

Create Wallet

Creates a public key – private key pair (or a mnemonic phrase) and a wallet address.

Request URL

Live URL https://bc-api.qpyou.cn/core/v0/wallet
Sandbox URL https://sandbox-bc-api.qpyou.cn/core/v0/wallet
HTTP Method POST
Content-Type application/json

Header Parameters

Field Name Description Type Required
x-network the blockchain networks {ploygon, xpla} string Y
Authorization Authentication token required to call the API string Y

Responses

Field Name Description Type
code api request result code, 0: success number
message the result message String
data API response data json
data.address the created wallet address string
data.privateKey the private key of the created wallet string
data.publicKey the public key of the created key (xpla) string

Request Sample

Response Sample

Get Wallet Information

Gets the information about the account status, like nonce (sequence), account number, and etc.
Gets the account status including the nonce (sequence) and the account number. If the wallet is a multi-sig wallet, the API returns the thresholds required for sending a transaction from this wallet and the information about the signers.

Request URL

Live URL https://bc-api.qpyou.cn/core/v1/wallet/{address}
Sandbox URL https://sandbox-bc-api.qpyou.cn/core/v1/wallet/{address}
HTTP Method GET
Content-Type application/json

Path Parameters

Field Name Description Type Required
address the address of the account whose information will be returned string Y

Header Parameters

Field Name Description Type Required
x-network the blockchain networks {ploygon, xpla} string Y
Authorization Authentication token required to call the API string Y

Responses

Field Name Description Type
code api request result code, 0: success number
message the result message String
data API response data json
data.nonce the nonce (sequence) of the wallet number
data.accountNumber the account number of the wallet (xpla) number
data.publicKey the public key of the wallet (xpla) string
data.type the wallet type

  • SINGLE: single-sig wallet
  • MULTI: multi-sig wallet
string
data.signers If the wallet type is MULTI, the wallet addresses of the multiple signers array
data.threshold the threshold for multiple signatures number

Request Sample

Response Sample

Get Wallet Balance

Gets the balance (Polygon: matic, XPLA: xpla) of the wallet.

Request URL

Live URL https://bc-api.qpyou.cn/core/v1/wallet/{address}/balance
Sandbox URL https://sandbox-bc-api.qpyou.cn/core/v1/wallet/{address}/balance
HTTP Method GET
Content-Type application/json

Path Parameters

Field Name Description Type Required
address the address of the account whose information will be returned string Y

Header Parameters

Field Name Description Type Required
x-network the blockchain networks {ploygon, xpla} string Y
Authorization Authentication token required to call the API string Y

Responses

Field Name Description Type
code api request result code, 0: success number
message the result message String
data API response data json
data.balance the balance that the account has string
data.rawBalance the wallet balance of the account not applying data.decimals string
data.decimals the maximum decimal places of the token number

Request Sample

Response Sample