Chain APIs
API related to Orbitchain.
API request is limited before mainnet launched (2020 1Q).
GasLimit: 3000000 / tx
TxLimit: 50 / sec ( total limit 100 / sec)
DeployTxLimit : 1 / min
CallLimit : 120 / min
[POST] /v1/ozys/sendRawTransaction
Parameters
Name
Type
Description
rawTransaction
String
Hex string result of signed raw transaction
Return values
type
Descripttion
JSON String
transaction hash of raw transaction
Example
>curl -d "rawTransaction=0xa13.....9ab" [API_DOMAIN]/v1/ozys/sendRawTransaction
{"txHash" : "0xbb508f.......5bf"}
[POST] /v1/ozys/deployContract
Parameters
Name
Type
Description
rawTransaction
String
Hex string result of signed raw transaction
Return values
Type
Description
JSON String
transaction hash of raw transaction
Example
>curl -d "rawTransaction=0xa13.....9ab" [API_DOMAIN]/v1/ozys/sendRawTransaction
{"txHash" : "0xbb508f.......5bf"}
[GET] /call/getBlockNumber
Return values
Type
Description
JSON String
latest block number and block hash
Example
> curl localhost:8084/v1/ozys/call/getBlockNumber
{"number":3293487,"hash":"0x42baf6219b9234acd18ccdbde975e3a5e5f40916937f520117f7e7d038f5c991"}
[GET] /call/tx/:thash
Return values
Type
Description
JSON String
Block and transaction information which transaction is included
Example
>curl localhost:8084/v1/ozys/call/tx/0x83f570d10d1450a72608cabedfba69ac9fa874b080fdb13696523e861d452d43
{"difficulty":"1","gasLimit":800000000,"gasUsed":94976,"hash":"0x9a7ec78f469889d89e3bdc7cdceae6a0d5409a5a5f3c0ce8eece3e1c9ffd6cad","miner":"0x0000000000000000000000000000000000000000","mixHash":"0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365","nonce":"0x0000000000000000","number":3293482,"parentHash":"0x9dfd9ed098acdb659a81c28774ba09a64179ccc7b5cd6c369262e805ef7ef464","receiptsRoot":"0x2eba27df580dab0349ef4a940b8c87d37b5daccfd37d7e97e43f492fecbc7d64","sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","size":1341,"stateRoot":"0x3256062401094189daf95100d3a179497920a51d62a588e98761374c081a361d","timestamp":1570158014,"totalDifficulty":"3293483","transactions":[{"blockHash":"0x9a7ec78f469889d89e3bdc7cdceae6a0d5409a5a5f3c0ce8eece3e1c9ffd6cad","blockNumber":3293482,"from":"0x56153404a3518Dc63F87df060EC881028EF441b2","gas":200000000,"gasPrice":"0","hash":"0x83f570d10d1450a72608cabedfba69ac9fa874b080fdb13696523e861d452d43","input":"0xf5137c5a00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000140000000000000000000000000c688866cf20ac5e47f34203e1b4aed2375c16ed1000000000000000000000000f50bfa247f91ddd98b7df5b0eab36db84b4833c2000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000004ed00eb3eb3380073a132218ff0555df225b7c550cfe01bf6c4bb054137c5bf298a99c2ccc796be78a5950a33214da933f3deed6de7e5f89fb930cb2358abfc58c5fc36d46798a4b456f444494f1f3d53e487e9ee3669478b3ac2643e6887396b0d5a5663a939df563fb2e01cb3d55213b0a02662dc4f22d918dc629cb407b59c00000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000013bb50000000000000000000000000000000000000000000000008ac7230489e8000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001","nonce":967,"to":"0xc688866CF20aC5E47F34203e1B4AEd2375C16eD1","transactionIndex":0,"value":"0","v":"0x1c","r":"0x4d63efa6387aadbf58f841dff7820416391689eb01561e50f154e060efa4b982","s":"0x69d0ec7fc07934f2aa033498e7844e581acf68a7d5ca9090e46cbef578b674a4","receiptStatus":"0x0"}],"transactionsRoot":"0x27fc28f983dda2382b2971965d7e40c44d7aef4505ce9a2288837a21845072f3","uncles":[]}
[POST] /call/getBalance
Parameters
Name
Type
Description
addr
String
Orbitchain wallet address
token
String
Orbitchain token address
Return values
Type
Description
JSON String
Json object which key is token address and value is token balance
Example
> curl -d "addr=0xba8b9183115b4f1716c78cbf483901df38e73b87&token=0x376fe2ae676892e508182c9e720e56a77fe68242a3e6a551bafea4027c981a98" localhost:8084/v1/ozys/call/getBalance/
{"0x376fe2ae676892e508182c9e720e56a77fe68242a3e6a551bafea4027c981a98":"0"}
[POST] /call/getNextNonce
Parameters
Name
Type
Description
addr
String
Orbitchain wallet address
Return values
Type
Description
Hex
Wallet's next nonce
Example
> curl -d "addr=0xba8b9183115b4f1716c78cbf483901df38e73b87" localhost:8084/v1/ozys/call/getNextNonce
"0x1"
[POST] /call/getBlock
Parameters
Name
Type
Description
blockNum
Integer
Target block number
txObj
Boolean
transaction object include or not
Return values
Type
Description
JSON String
Block information data
Example
> curl -d "blockNum=3293482&txObj=true" localhost:8084/v1/ozys/call/getBlock
{"number":3293482,"hash":"0x9a7ec78f469889d89e3bdc7cdceae6a0d5409a5a5f3c0ce8eece3e1c9ffd6cad","timestamp":1570158014,"transaction":[{"blockHash":"0x9a7ec78f469889d89e3bdc7cdceae6a0d5409a5a5f3c0ce8eece3e1c9ffd6cad","blockNumber":3293482,"from":"0x56153404a3518Dc63F87df060EC881028EF441b2","gas":200000000,"gasPrice":"0","hash":"0x83f570d10d1450a72608cabedfba69ac9fa874b080fdb13696523e861d452d43","input":"0xf5137c5a00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000140000000000000000000000000c688866cf20ac5e47f34203e1b4aed2375c16ed1000000000000000000000000f50bfa247f91ddd98b7df5b0eab36db84b4833c2000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000004ed00eb3eb3380073a132218ff0555df225b7c550cfe01bf6c4bb054137c5bf298a99c2ccc796be78a5950a33214da933f3deed6de7e5f89fb930cb2358abfc58c5fc36d46798a4b456f444494f1f3d53e487e9ee3669478b3ac2643e6887396b0d5a5663a939df563fb2e01cb3d55213b0a02662dc4f22d918dc629cb407b59c00000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000013bb50000000000000000000000000000000000000000000000008ac7230489e8000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001","nonce":967,"to":"0xc688866CF20aC5E47F34203e1B4AEd2375C16eD1","transactionIndex":0,"value":"0","v":"0x1c","r":"0x4d63efa6387aadbf58f841dff7820416391689eb01561e50f154e060efa4b982","s":"0x69d0ec7fc07934f2aa033498e7844e581acf68a7d5ca9090e46cbef578b674a4"}]}
[POST] /call/getBlockLogs
Parameters
Name
Type
Description
startNum
Integer
Start block number want to search
endNum
Integer
End block number want to search
parse
Boolean
Parse address or not
Return values
Type
Description
JSON String
blocks information with event logs
Example
> curl -d "parse=true&endNum=3293482&startNum=3293480" localhost:8084/v1/ozys/call/getBlockLogs
[{"address":"0x2bcFc53CA5b854102ACa4eFD06043B0C8d5e350C","topics":["0x30b1b5fbdedaf2927859653636cb63ab6abd50b621af19a175f1490cb85118a3","0x0000000000000000000000004cc351186c3aec007cad66601aa599dc53c5d688","0x0000000000000000000000007ca39bbb6d8f68db3912384ca4b6f0526b774d98","0xed00eb3eb3380073a132218ff0555df225b7c550cfe01bf6c4bb054137c5bf29"],"data":"0x0000000000000000000000000000000000000000000000008ac7230489e80000","blockNumber":3293481,"transactionHash":"0xdbf295fe597ab87c9d42891d976aefee85ddb3c00b3d5f8e961eff75e568ee78","transactionIndex":1,"blockHash":"0x9dfd9ed098acdb659a81c28774ba09a64179ccc7b5cd6c369262e805ef7ef464","logIndex":0,"removed":false,"id":"log_500c3127","ozys":"bal","oaddr":"0x2bcfc53ca5b854102aca4efd06043b0c8d5e350c","decoded":{"event":"Transfer","data":{"fromAddr":"0x4cc351186c3AEC007CAd66601aA599dC53c5D688","toAddr":"0x7cA39BbB6d8F68DB3912384Ca4B6f0526b774D98","tokenId":"0xed00eb3eb3380073a132218ff0555df225b7c550cfe01bf6c4bb054137c5bf29","amount":"10000000000000000000"}}},{"address":"0x2bcFc53CA5b854102ACa4eFD06043B0C8d5e350C","topics":["0x540cb287c1b7845ba43c77af00dff093b528b8c6dd8ec0c8c51a6ff6046521b4","0x0000000000000000000000004cc351186c3aec007cad66601aa599dc53c5d688","0xed00eb3eb3380073a132218ff0555df225b7c550cfe01bf6c4bb054137c5bf29"],"data":"0x00000000000000000000000000000000000000000008336e3c43246832ee1456","blockNumber":3293481,"transactionHash":"0xdbf295fe597ab87c9d42891d976aefee85ddb3c00b3d5f8e961eff75e568ee78","transactionIndex":1,"blockHash":"0x9dfd9ed098acdb659a81c28774ba09a64179ccc7b5cd6c369262e805ef7ef464","logIndex":1,"removed":false,"id":"log_ca2aa491","ozys":"bal","oaddr":"0x2bcfc53ca5b854102aca4efd06043b0c8d5e350c","decoded":{"event":"BalanceChange","data":{"user":"0x4cc351186c3AEC007CAd66601aA599dC53c5D688","tokenId":"0xed00eb3eb3380073a132218ff0555df225b7c550cfe01bf6c4bb054137c5bf29","balance":"9914280731745989019178070"}}},{"address":"0x2bcFc53CA5b854102ACa4eFD06043B0C8d5e350C","topics":["0x540cb287c1b7845ba43c77af00dff093b528b8c6dd8ec0c8c51a6ff6046521b4","0x0000000000000000000000007ca39bbb6d8f68db3912384ca4b6f0526b774d98","0xed00eb3eb3380073a132218ff0555df225b7c550cfe01bf6c4bb054137c5bf29"],"data":"0x000000000000000000000000000000000000314dc6448d93c3887e0e89e80000","blockNumber":3293481,"transactionHash":"0xdbf295fe597ab87c9d42891d976aefee85ddb3c00b3d5f8e961eff75e568ee78","transactionIndex":1,"blockHash":"0x9dfd9ed098acdb659a81c28774ba09a64179ccc7b5cd6c369262e805ef7ef464","logIndex":2,"removed":false,"id":"log_cd7e6773","ozys":"bal","oaddr":"0x2bcfc53ca5b854102aca4efd06043b0c8d5e350c","decoded":{"event":"BalanceChange","data":{"user":"0x7cA39BbB6d8F68DB3912384Ca4B6f0526b774D98","tokenId":"0xed00eb3eb3380073a132218ff0555df225b7c550cfe01bf6c4bb054137c5bf29","balance":"1000000000000010000000000000000000"}}},{"address":"0x2bcFc53CA5b854102ACa4eFD06043B0C8d5e350C","topics":["0x30b1b5fbdedaf2927859653636cb63ab6abd50b621af19a175f1490cb85118a3","0x0000000000000000000000007ca39bbb6d8f68db3912384ca4b6f0526b774d98","0x0000000000000000000000009bebae0c6ce651a33a3cee421bdc1ff7441e28fa","0xed00eb3eb3380073a132218ff0555df225b7c550cfe01bf6c4bb054137c5bf29"],"data":"0x0000000000000000000000000000000000000000000000008ac7230489e80000","blockNumber":3293481,"transactionHash":"0xdbf295fe597ab87c9d42891d976aefee85ddb3c00b3d5f8e961eff75e568ee78","transactionIndex":1,"blockHash":"0x9dfd9ed098acdb659a81c28774ba09a64179ccc7b5cd6c369262e805ef7ef464","logIndex":3,"removed":false,"id":"log_9bf60a37","ozys":"bal","oaddr":"0x2bcfc53ca5b854102aca4efd06043b0c8d5e350c","decoded":{"event":"Transfer","data":{"fromAddr":"0x7cA39BbB6d8F68DB3912384Ca4B6f0526b774D98","toAddr":"0x9BebaE0C6Ce651A33A3CEe421bDC1fF7441e28Fa","tokenId":"0xed00eb3eb3380073a132218ff0555df225b7c550cfe01bf6c4bb054137c5bf29","amount":"10000000000000000000"}}},{"address":"0x2bcFc53CA5b854102ACa4eFD06043B0C8d5e350C","topics":["0x540cb287c1b7845ba43c77af00dff093b528b8c6dd8ec0c8c51a6ff6046521b4","0x0000000000000000000000007ca39bbb6d8f68db3912384ca4b6f0526b774d98","0xed00eb3eb3380073a132218ff0555df225b7c550cfe01bf6c4bb054137c5bf29"],"data":"0x000000000000000000000000000000000000314dc6448d9338c15b0a00000000","blockNumber":3293481,"transactionHash":"0xdbf295fe597ab87c9d42891d976aefee85ddb3c00b3d5f8e961eff75e568ee78","transactionIndex":1,"blockHash":"0x9dfd9ed098acdb659a81c28774ba09a64179ccc7b5cd6c369262e805ef7ef464","logIndex":4,"removed":false,"id":"log_837d9efb","ozys":"bal","oaddr":"0x2bcfc53ca5b854102aca4efd06043b0c8d5e350c","decoded":{"event":"BalanceChange","data":{"user":"0x7cA39BbB6d8F68DB3912384Ca4B6f0526b774D98","tokenId":"0xed00eb3eb3380073a132218ff0555df225b7c550cfe01bf6c4bb054137c5bf29","balance":"1000000000000000000000000000000000"}}},{"address":"0x2bcFc53CA5b854102ACa4eFD06043B0C8d5e350C","topics":["0x540cb287c1b7845ba43c77af00dff093b528b8c6dd8ec0c8c51a6ff6046521b4","0x0000000000000000000000009bebae0c6ce651a33a3cee421bdc1ff7441e28fa","0xed00eb3eb3380073a132218ff0555df225b7c550cfe01bf6c4bb054137c5bf29"],"data":"0x000000000000000000000000000000000000314dc64514a13166c741cfda98a4","blockNumber":3293481,"transactionHash":"0xdbf295fe597ab87c9d42891d976aefee85ddb3c00b3d5f8e961eff75e568ee78","transactionIndex":1,"blockHash":"0x9dfd9ed098acdb659a81c28774ba09a64179ccc7b5cd6c369262e805ef7ef464","logIndex":5,"removed":false,"id":"log_b054444d","ozys":"bal","oaddr":"0x2bcfc53ca5b854102aca4efd06043b0c8d5e350c","decoded":{"event":"BalanceChange","data":{"user":"0x9BebaE0C6Ce651A33A3CEe421bDC1fF7441e28Fa","tokenId":"0xed00eb3eb3380073a132218ff0555df225b7c550cfe01bf6c4bb054137c5bf29","balance":"1000000000637777199706039857617060"}}},{"address":"0x7cA39BbB6d8F68DB3912384Ca4B6f0526b774D98","topics":["0x8da05741ae9e80cea2ff03db92d167711736941cab1249d5979ec30f6256aa45"],"data":"0x0000000000000000000000004cc351186c3aec007cad66601aa599dc53c5d6885bb3b06a83dfd23b042f07e30555ff9c8216ddd5a087c6fcf4cbe2dfbe198caed9dabe5aff70e142d46a6c996aeec509b5be7fef87400654d5a4c8779091c6560000000000000000000000000000000000000000000000000000000000009ddb0000000000000000000000000000000000000000000000000000000000000000ed00eb3eb3380073a132218ff0555df225b7c550cfe01bf6c4bb054137c5bf290000000000000000000000000000000000000000000000008ac7230489e800000000000000000000000000000000000000000000000000000000000000000001","blockNumber":3293481,"transactionHash":"0xdbf295fe597ab87c9d42891d976aefee85ddb3c00b3d5f8e961eff75e568ee78","transactionIndex":1,"blockHash":"0x9dfd9ed098acdb659a81c28774ba09a64179ccc7b5cd6c369262e805ef7ef464","logIndex":6,"removed":false,"id":"log_54220326"}]
[POST] /call/getFullBlock
Parameters
Name
Type
Description
blockNum
Integer
Target block number
Return values
Type
Description
JSON String
block information with events logs
Example
> curl -d "blockNum=3293480" localhost:8084/v1/ozys/call/getFullBlock
{"difficulty":"1","gasLimit":800000000,"gasUsed":94976,"hash":"0x9a7ec78f469889d89e3bdc7cdceae6a0d5409a5a5f3c0ce8eece3e1c9ffd6cad","miner":"0x0000000000000000000000000000000000000000","mixHash":"0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365","nonce":"0x0000000000000000","number":3293482,"parentHash":"0x9dfd9ed098acdb659a81c28774ba09a64179ccc7b5cd6c369262e805ef7ef464","receiptsRoot":"0x2eba27df580dab0349ef4a940b8c87d37b5daccfd37d7e97e43f492fecbc7d64","sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","size":1341,"stateRoot":"0x3256062401094189daf95100d3a179497920a51d62a588e98761374c081a361d","timestamp":1570158014,"totalDifficulty":"3293483","transactions":[{"blockHash":"0x9a7ec78f469889d89e3bdc7cdceae6a0d5409a5a5f3c0ce8eece3e1c9ffd6cad","blockNumber":3293482,"from":"0x56153404a3518Dc63F87df060EC881028EF441b2","gas":200000000,"gasPrice":"0","hash":"0x83f570d10d1450a72608cabedfba69ac9fa874b080fdb13696523e861d452d43","input":"0xf5137c5a00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000140000000000000000000000000c688866cf20ac5e47f34203e1b4aed2375c16ed1000000000000000000000000f50bfa247f91ddd98b7df5b0eab36db84b4833c2000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000004ed00eb3eb3380073a132218ff0555df225b7c550cfe01bf6c4bb054137c5bf298a99c2ccc796be78a5950a33214da933f3deed6de7e5f89fb930cb2358abfc58c5fc36d46798a4b456f444494f1f3d53e487e9ee3669478b3ac2643e6887396b0d5a5663a939df563fb2e01cb3d55213b0a02662dc4f22d918dc629cb407b59c00000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000013bb50000000000000000000000000000000000000000000000008ac7230489e8000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001","nonce":967,"to":"0xc688866CF20aC5E47F34203e1B4AEd2375C16eD1","transactionIndex":0,"value":"0","v":"0x1c","r":"0x4d63efa6387aadbf58f841dff7820416391689eb01561e50f154e060efa4b982","s":"0x69d0ec7fc07934f2aa033498e7844e581acf68a7d5ca9090e46cbef578b674a4","receiptStatus":"0x0"}],"transactionsRoot":"0x27fc28f983dda2382b2971965d7e40c44d7aef4505ce9a2288837a21845072f3","uncles":[]}
Last updated