Transaction API sends transactions and gets their information.

Get Transaction Information

Gets the transaction information using a transaction hash (txhash). Only the information of the transactions recorded on a blockchain can be returned.

Request URL

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

Path Parameters

Field Name Description Type Required
txhash the transaction hash string Y

Header Parameters

Field Name Description Type Required
x-network the blockchain networks {ploygon, xpla} 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.txhash the transaction hash string
data.blockNumber the block number of the block that contains the transaction number
data.status the transaction status (success after the transaction was successfully recorded on a block of a blockchain) string
data.fee the applied fee json
data.data the transaction data

json
data.logs the transaction log json

Request Sample

Response Sample

Send Transaction

Sends the signed transaction to a blockchain.

Request URL

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

Header Parameters

Field Name Description Type Required
x-network the blockchain networks {ploygon, xpla} string Y

Request Body

Field Name Description Type Required
signedTx the signed transaction string Y
sync the synchronous/asynchronous process of the transaction

  • true: The transaction will be processed in a sychronous way, meaning that the API will wait until the transaction is finished being recorded on a blockchain. After sending the API request, the API waits until it gets the response value (txHash).
  • false: The transaction will be processed in an asychronous way, meaning that you may not get the result of transaction transferral at the moment. You need to use Get Transaction Information API to verify the transferral result of the transaction.
boolean 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.txhash the transaction hash string
data.status the transaction status string

Request Sample

Response Sample