OST KIT⍺ API | Query Transaction Status
Send a POST request on /transaction-types/status
to query the status of executed transactions. Multiple uuids can be passed in a single request to receive the status of all.
Input Parameters
Parameter | Type | Value |
---|---|---|
api_key | string | mandatory API key obtained from kit.ost.com |
request_timestamp | number | mandatory epoch time in seconds of current time |
signature | hexstring | mandatory signature generated for current request |
transaction_uuids[] | string | unique identifier for an executed transaction that is part of an array |
where the signature is derived from the API secret key and the string to sign. The string to sign is formed with API parameters alphabetically sorted as below,
/transaction-types/status?api_key=API_KEY&request_timestamp=EPOCH_TIME_SEC&transaction_uuids[]=TRANSACTION_UUID
The request url of this post request reads as
POST -
https://playgroundapi.ost.com/transaction-types/status
and the parameters are sent in the request body with default application/x-www-form-urlencoded
content-type so the request body uses the same format as the query string:
Content-Type: application/x-www-form-urlencoded
api_key=API_KEY&request_timepstamp=EPOCH_TIME_SEC&signature=SIGNATURE&transaction_uuids[]=TRANSACTION_UUID
JSON Response Object
Key | Type | Value |
---|---|---|
success | bool | post successful |
data | object | (optional) data object describing result if successful |
err | object | (optional) describing error if not successful |
For API calls to /transaction-types/status
the result_type
is a string "transactions", that is an array containing objects each with the attributes described below, which are the details of the executed transaction.
Response Transaction Object Attributes
Parameter | Type | Definition |
---|---|---|
from_user_id | string | origin user of the branded token transaction |
to_user_id | string | destination user of the branded token transaction |
transaction_uuid | string | id of the executed transaction type |
client_token_id | number | id of the branded token |
transaction_hash | hexstring | the generated transaction hash |
status | string | the execution status of the transaction type: "processing", "failed" or "complete" |
gas_price | string | value of the gas utilized for the transaction |
transaction_timestamp | string | universal time stamp value of execution of the transaction in milliseconds |
uts | number | universal time stamp value in milliseconds |
gas_used | string | (optional) hexadecimal value of the gas used to execute the tranaction |
transaction_fee | string | (optional) the value of the gas used at the gas price |
block_number | number | (optional) the block on the chain in which the transaction was included |
bt_transfer_value | string | (optional) the amount of branded tokens transferred to the destination user |
bt_commission_amount | string | (optional) the amount of branded tokens transferred to the company |
Sample Success Response
{
"success": true,
"data": {
"client_tokens": {
"30117": {
"id": "30117",
"client_id": 1124,
"name": "hkedgrd 3",
"symbol": "ghpi",
"symbol_icon": "token_icon_4",
"conversion_factor": "0.03085",
"airdrop_contract_addr": "0x3afd9f2273af535c513c2a35f56aF1Fe65E1dBaA",
"uts": 1520182157543
}
},
"transaction_types": {
"20334": {
"id": "20334",
"name": "Reward",
"kind": "company_to_user",
"currency_type": "BT",
"currency_value": "5",
"commission_percent": "0.00",
"status": "active",
"uts": 1520182157546
}
},
"economy_users": {
"ae5b9aa6-a45d-439a-bb22-027df78727a1": {
"id": "ae5b9aa6-a45d-439a-bb22-027df78727a1",
"uuid": "ae5b9aa6-a45d-439a-bb22-027df78727a1",
"name": "",
"kind": "reserve",
"uts": 1520182157551
},
"91af390d-843d-44eb-b554-5ad01f874eba": {
"id": "91af390d-843d-44eb-b554-5ad01f874eba",
"uuid": "91af390d-843d-44eb-b554-5ad01f874eba",
"name": "User 4",
"kind": "user",
"uts": 1520182157551
}
},
"result_type": "transactions",
"transactions": [
{
"id": "4bc71630-c131-4b8d-814a-33184d1e6fe1",
"transaction_uuid": "4bc71630-c131-4b8d-814a-33184d1e6fe1",
"from_user_id": "ae5b9aa6-a45d-439a-bb22-027df78727a1",
"to_user_id": "91af390d-843d-44eb-b554-5ad01f874eba",
"transaction_type_id": "20334",
"client_token_id": 30117,
"transaction_hash": "0xe945362504b20eab78b51fdc9e699686eabf3089d40ea57fe552d147ab11f1ba",
"status": "complete",
"gas_price": "0x12A05F200",
"transaction_timestamp": 1520165780,
"uts": 1520182157540,
"gas_used": "99515",
"transaction_fee": "0.000497575",
"block_number": 213100,
"bt_transfer_value": "5",
"bt_commission_amount": "0"
}
]
}
}
Sample Code | Curl
curl --request POST \
--url 'https://playgroundapi.ost.com/transaction-types/status'
--header 'Accept: application/json' \
--form request_timestamp=EPOCH_TIME_SEC \
--form signature=SIGNATURE \
--form api_key=API_KEY \
--form transaction_uuids[]=TRANSACTION_UUID \
last updated 22 May 2018; for support see help.ost.com
OST KIT⍺ v1 | OpenST Platform v0.9.2