导航
English
Java Python Go C++

Overview

Welcome to our OKExChain API documentation. We offer complete REST APIs to suit your needs.

Contact

Please feel free to join our API community on Telegram, where we will help answer your questions and you can share your experiences with other users.

For WeChat, please remark: API + Name + OKEXChain Account ID, to the API support group.

Account

The API endpoints of Account .

Get balance

The API endpoints of Get Balance of all currencies for a single Address . By default, just show currencies partially, you can use parameter of show=all to see all; you can use the parameter of symbol=btc to see just one.

Rate Limit: 6 requests per second

HTTP Request

GET okexchain/v1/accounts/{address}

Request Example

https://www.okex.com/okexchain/v1/accounts/ex1508d7eq592kg2lh9d46xvv3r4sm7gm8we5fakv
https://www.okex.com/okexchain/v1/accounts/ex1508d7eq592kg2lh9d46xvv3r4sm7gm8we5fakv?show=partial
https://www.okex.com/okexchain/v1/accounts/ex1508d7eq592kg2lh9d46xvv3r4sm7gm8we5fakv?show=all
https://www.okex.com/okexchain/v1/accounts/ex1508d7eq592kg2lh9d46xvv3r4sm7gm8we5fakv?symbol=btc

Request Parameters

Parameter Type Required Description
address String Yes
show String No Type:
all: show all
partial: show part
symbol String No for example btc

Example Response

{
    "code": 0,
    "msg": "",
    "detail_msg": "",
    "data": {
        "address": "ex1508d7eq592kg2lh9d46xvv3r4sm7gm8we5fakv",
        "currencies": [{
            "symbol": "okt",
            "available": "51123.350000000000000000",
            "locked": "0"
        }]
    }
}

Response Parameters

Parameter Type Description
address String
currencies String
> symbol String Currency symbol
> available String The amount can use
> locked String The amount locked

Get accountNumber and sequence

The API endpoints of get user's account_number and sequence

Rate Limit: 6 requests per second

HTTP Request

GET okexchain/v1/auth/accounts/{address}

Request Example

https://www.okex.com/okexchain/v1/auth/accounts/ex1xkl5agjzqnjnptyat2dng2asmx8g5kll7evelk

Request Parameters

Parameter Type Required Description
address String Yes

Example Response

{
    "type": "okexchain/EthAccount",
    "value": {
        "address": "ex1xkl5agjzqnjnptyat2dng2asmx8g5kll7evelk",
        "eth_address": "0x35bf4EA24204E530AC9d5a9b342bB0D98e8a5bfF",
        "coins": [{
            "denom": "okt",
            "amount": "52741.300000000000000000"
        }],
        "public_key": "expub17weu6qepqw9q0u6snmd40a7d6jqc5ey4z0se30ev09jw44pnz29lf36p0euv26pqjvf",
        "account_number": 49,
        "sequence": 15,
        "code_hash": "c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"
    }
}

Response Parameters

Parameter Type Description
address String Address of OKExChain
eth_address String Address of Etherscan
public_key String
account_number String
sequence String
code_hash String
coins Array
> denom String
> amount String

Blocks

The API endpoints of Blocks .

Get latest blocks

Get the latest information on blocks

Rate Limit: 6 requests per second

HTTP Request

GET okexchain/v1/blocks/latest

Request Example

https://www.okex.com/okexchain/v1/blocks/latest

Request Parameters

None

Example Response

{
  "block_id": {
    "hash": "318A4D6BCBBF646BFB85803D4A4DFBB30BFBC42DC424D4B26ADE34C43E6FA135",
    "parts": {
      "total": "1",
      "hash": "E9FCD3B437149AFE48986DB4D990F9413C0D29F29E066CD753D949FAF86C746E"
    }
  },
  "block": {
    "header": {
      "version": {
        "block": "10",
        "app": "0"
      },
      "chain_id": "exchain-66",
      "height": "2603621",
      "time": "2021-05-07T08:01:26.35548598Z",
      "last_block_id": {
        "hash": "7FE82A494E32E54CB1BAB23B9742101B26347B5AA08C08F4F146C8B1E3FE7635",
        "parts": {
          "total": "1",
          "hash": "4DD2803A3C906A1D8CCD9F05B09C46EE91A0F4C19E49EB60F36E4D49D1DDB639"
        }
      },
      "last_commit_hash": "0464FACC42944898C4B58AF4B9AACB5640889AD1CC2BB9F4667A12400513C679",
      "data_hash": "16AA2C550F7B7734F1BD0453DC5641C31AFD6DC12D59A4657D745792D1A2C0F5",
      "validators_hash": "FFAA79D077B93BBE1568A2773B7770D261D749A3D1F1DF7FB5DCF08EFE29521D",
      "next_validators_hash": "FFAA79D077B93BBE1568A2773B7770D261D749A3D1F1DF7FB5DCF08EFE29521D",
      "consensus_hash": "048091BC7DDC283F77BFBF91D73C44DA58C3DF8A9CBC867405D8B7F3DAADA22F",
      "app_hash": "EB98972779BE109B820676CCAFBE26D1AE191B4895D5D3B60385A133F708611B",
      "last_results_hash": "",
      "evidence_hash": "",
      "proposer_address": "C12BA4719F0F124D44CD1C820F7A7DE5AA2724EF"
    },
    "data": {
      "txs": [
        "mwolpr5UCpQKCJ4WEgoxMDAwMDAwMDAwGODsDSIUMbgg2ke0662B9lP98ylS0bwbxGkqATAyxAjIFSi4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYJTzvAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADP2X7cAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABnByaWNlcwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANCVEMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYJTzRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADP8z/ggAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABnByaWNlcwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANCVEMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABguzqbTA0FJlOQczVDQz4kCirKtcW+789YroCK2MVd0KNxcJuTnNaWnfV4287csYS36Q3NZ0kdV0QzBDjf31wK1wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGCt0M/dRE+bEKGIiydvN/Q1NKWMOuCK98/4ZG6wc91hjttMyfgBLC8+OboF9XdBf2805VoD6UauSIxrpkAQO8QJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABs6AjI3QkwyNzY1NDA5OTU1MzQ4NzcxMTkxMzU1MDQxNTE1NDQwNTYyNTg4OTc3MDM2NTU3ODM3NzczMTc3NTA3MDI5MTc5MDczNDE1MzI4NTI5Sk0zNTQwMzY5Mzg5OTU3NDY0MDQ0MzQxNDk0MTk1NjgzMDc1MTE2OTY2ODE0MDk3NTI0NDY0NzQ0MzM0NzQ5MzM4MjE1MjU3OTI4MjMyOA=="
      ]
    },
    "evidence": {
      "evidence": null
    },
    "last_commit": {
      "height": "2603620",
      "round": "0",
      "block_id": {
        "hash": "7FE82A494E32E54CB1BAB23B9742101B26347B5AA08C08F4F146C8B1E3FE7635",
        "parts": {
          "total": "1",
          "hash": "4DD2803A3C906A1D8CCD9F05B09C46EE91A0F4C19E49EB60F36E4D49D1DDB639"
        }
      },
      "signatures": [
        {
          "block_id_flag": 2,
          "validator_address": "0FE9CF2FFAC38F7BCC50818B9B431FF9934C9597",
          "timestamp": "2021-05-07T08:01:26.482302807Z",
          "signature": "Hs9xfPWcGvUMTtaEBFDdbPxrjqlQf0FPvC+syFkFKaXowfkI3rLxRBJTRRUrjtVpN83mK3Uge4IfDc/trrjjCQ=="
        },
        {
          "block_id_flag": 2,
          "validator_address": "1C2BB905E9B6F7D6B8625077CD955C0F1A3BA026",
          "timestamp": "2021-05-07T08:01:26.32079867Z",
          "signature": "nC99f5Kkprn/zZAk+jlU2Vgqo/foHb+PP2eorRZQQuVKhNIQV+hF+3g5EKMaNgYGlGw1ufaYss9r4IGZq9ETDA=="
        },
        {
          "block_id_flag": 2,
          "validator_address": "206BC60D6024CCFE4062CE1D358C5BA18CDCA284",
          "timestamp": "2021-05-07T08:01:26.350357993Z",
          "signature": "WWdf79WVBVwCZWY7owpSGfDqnPOX40v15kFQyUSK5I2OeOXvFEY3O1uwhrWAnHXTPWsf7eNdBMCgafNTAwnNCA=="
        },
        {
          "block_id_flag": 2,
          "validator_address": "2DA545954A696F8F09AEF25AEDE2B0DDE1A67B60",
          "timestamp": "2021-05-07T08:01:26.350464826Z",
          "signature": "aaLobtLpl/NwKm+vxT5SCcDTguApIO294TX8vNSVWTnxJ61Qx+IbkhMNF8kPcyHuF2+deoMjLhBQZ2vAhLFuBA=="
        },
        {
          "block_id_flag": 2,
          "validator_address": "32409E2BBF7F551EC182769BD142B2F262B261F0",
          "timestamp": "2021-05-07T08:01:26.357054729Z",
          "signature": "wk2+WYIMQ5kQTUfHC6KV0pdeK91P7ZWqvgGhoVBKlKRd6R8/MBSOfrnS+mhSVRyCGDBla2Vubcgk9gQD1MNiCg=="
        },
        {
          "block_id_flag": 2,
          "validator_address": "33FAA80AA17F6412E8594ED447BAD09454A557AC",
          "timestamp": "2021-05-07T08:01:26.35548598Z",
          "signature": "Ma0UNpyyKs89ZakVNa7ZYNyIAVfdmirYCocyaU36K1i/HHNrNNc4ikdLvNzJSA9YGOcKU7NvguW9ZIRZphg8Cg=="
        },
        {
          "block_id_flag": 2,
          "validator_address": "456D70DDD05B7AF40369FABFFDFACC2135AA5232",
          "timestamp": "2021-05-07T08:01:26.354770468Z",
          "signature": "cNWX9Z3/lYgy455QfH6Os+M8IWPXp4a+3X4o92Bhc9Il8mi0/a9cX9kL5fNQDh2Tg4GrDr9mM1nUmIezPl9CCQ=="
        },
        {
          "block_id_flag": 2,
          "validator_address": "5304C540AD76FD12BF228C30DC889AD2F80A65FC",
          "timestamp": "2021-05-07T08:01:26.442362032Z",
          "signature": "6CRIdv7yp52/iWH+/WmLmY+h+Pg1JsrvEHCzHtuDX03O+50bQDns+fn1RpswdvrnKCghrRQzjmzfvyANATueBw=="
        },
        {
          "block_id_flag": 2,
          "validator_address": "697C3DBA5A7E7326B560E496D6F7B9924A26ED1B",
          "timestamp": "2021-05-07T08:01:26.383749463Z",
          "signature": "DHV4ndTjz1zTwCgm6aZArZugg01AHgeyhx4LU6u//boMpBM92WAP6Urh1vewZqHypm9GQHKMUhOGLHycZA9YBw=="
        },
        {
          "block_id_flag": 2,
          "validator_address": "6BE29CEF63D91013E5DE84064BAC7B2DE2B8B949",
          "timestamp": "2021-05-07T08:01:26.379679477Z",
          "signature": "Z24TLSMlC7ONPhWDzCNEeiwsbfzB7IClfe1lpmyeTt0+MFMvIZdKIfVYSPaBylfSXW8NSAyDRKoXofRJQqKtBw=="
        },
        {
          "block_id_flag": 2,
          "validator_address": "7AE14A0113E95291CB37E5773A699A01D5071C1D",
          "timestamp": "2021-05-07T08:01:26.353737588Z",
          "signature": "EbwqvKVO49a8wLySrTIeckRLWSV4WLEPvM/nOfUKIdQOK/t9cGf7r2xBbchR67EKimLzg47GOtrMYPXXrTYzBA=="
        },
        {
          "block_id_flag": 2,
          "validator_address": "B08F1E9CD9BDAD3EB8AEEC37E0662ABCC70BFB3E",
          "timestamp": "2021-05-07T08:01:26.376131036Z",
          "signature": "Ei+ju2r1sk+7HyOMlgY0gLBKWsheepdzamZtud5BrlsCPmDuT8TpDToN5U0W1LamLerGE+0QhqDtC0dSOdFLCw=="
        },
        {
          "block_id_flag": 2,
          "validator_address": "B527086523C2B0B093BECFE42D45729B6775F56D",
          "timestamp": "2021-05-07T08:01:26.344440065Z",
          "signature": "P1l6GhSDpiYrnmrGgqDKbt95hPBm5sMq+p1A3tdEx31EOU+To9vk+f4BMZfJw/eXbPH2OuvqbPtWizFhfM/mDA=="
        },
        {
          "block_id_flag": 2,
          "validator_address": "B8586789B5681169A6CDC670775AC83FF560AA2F",
          "timestamp": "2021-05-07T08:01:26.380683036Z",
          "signature": "U/X4zMSBchYNikSnsX1297kWMp5hnI1jBaw4fxNLCv8tLjNFQqhunlQ65eypl1qlFGaAAhTzghZgq9vbLOQ7Bw=="
        },
        {
          "block_id_flag": 2,
          "validator_address": "C12BA4719F0F124D44CD1C820F7A7DE5AA2724EF",
          "timestamp": "2021-05-07T08:01:26.383968357Z",
          "signature": "0vDSh0IaRBRfGluifumJpAbbW90SKVaM8gFN8pu7/eb0NL7U3n1YPpPxrBiL5jpOhvy/VZyuIVjjcSEH/F6cDA=="
        },
        {
          "block_id_flag": 2,
          "validator_address": "C1D32DDFC3C0C06F44BEE90593D5ED7539D5BA12",
          "timestamp": "2021-05-07T08:01:26.354564603Z",
          "signature": "CCexLtzVEtujUQVcjjOC8uN+AOAQvmgvA/cKLmcFIvDyRJUgwTy1cFRZVA38S/adcB6DE70xaV8YG/mwxeETDw=="
        },
        {
          "block_id_flag": 2,
          "validator_address": "C624AEA0BAF4BB7D65B204B6D50D26D0D0AF5DA0",
          "timestamp": "2021-05-07T08:01:26.345453216Z",
          "signature": "1IsSxY4D1epNXoP1GTZ9dxkuq9MhQBdA/nLVSN+XjhffDHxquJwMuklRPJC9L59v99y3EUEbDtQzq3eGgJ9gAA=="
        },
        {
          "block_id_flag": 2,
          "validator_address": "D67B9BA8B93D16A80B3F228D9DDCEFBEC0463D10",
          "timestamp": "2021-05-07T08:01:26.373584005Z",
          "signature": "1cWu3c5WhU7qmvmQLa928MPTRTphEYIyVtDJ46KpnBDUOLwyg1cuNMJzx7V5+YrCNbiZdVqjXp1hcsZPYPzqCQ=="
        },
        {
          "block_id_flag": 2,
          "validator_address": "D7958E043A8FCFF9405F043E1F8EFFB9C1147F60",
          "timestamp": "2021-05-07T08:01:26.354144567Z",
          "signature": "dtW1xcZbfNdXyd2xhI2VNoOaJgjnGxTcovlZN9SMzHc+9HrneFo87b5cGjxxiOeil/EQDxykw2E60M2Lm056Dw=="
        },
        {
          "block_id_flag": 2,
          "validator_address": "E3F8C6177337DC894631E702D8154BBEC9A931D5",
          "timestamp": "2021-05-07T08:01:26.354528064Z",
          "signature": "r5jcMKtINAQrMFMWBz2Z6c7DlKnjLfMQ4Ao4IzLsCoe+FSw72kUchlmXIibDohw5XrZItdlRk8TRug4e1+aHAg=="
        },
        {
          "block_id_flag": 2,
          "validator_address": "E42368D36DEB5E5D6682858E730E63014B1CA2C5",
          "timestamp": "2021-05-07T08:01:26.389600911Z",
          "signature": "cJfHaM+u8ubzhW+ixtyqekBUBjQM5ObEX9/QiymGNJ66Tbf/PQGV6vdt5NDlCs7XtP94THOT/gP643ttY6x8Dg=="
        }
      ]
    }
  }
}

Response Parameters

Parameter Type Description
block_id Object
> parts Object
>> total String
>> hash String
> hash String
block Object
> data Object
>> txs String
> evidence Object
>> evidence String
> last_commit Object
>> round String
>> block_id Object
>>> parts Object
>>>> total String
>>>> hash String
>>> hash String
>> signatures Array
>>> signature String
>>> validator_address String
>>> block_id_flag String
>>> timestamp String
>> height String
> header Object
>> validators_hash String
>> chain_id String
>> consensus_hash String
>> proposer_address String
>> next_validators_hash String
>> version Object
>>> app String
>>> block String
>> data_hash String
>> last_results_hash String
>> last_block_id Object
>>> parts Object
>>>> total String
>>>> hash String
>>> hash String
>> evidence_hash String
>> app_hash String
>> time String
>> height String
>> last_commit_hash String

Check node syncing

GET if the node is currently syning with other nodes

Rate Limit: 6 requests per second

HTTP Request

GET okexchain/v1/syncing

Request Example

https://www.okex.com/okexchain/v1/syncing

Request Parameters

None

Example Response

{
  "syncing": false
}

Response Parameters

Parameter Type Description
syncing Object

Get block info

Get information on by block height

Rate Limit: 6 requests per second

HTTP Request

GET okexchain/v1/blocks/{height}

Request Example

https://www.okex.com/okexchain/v1/blocks/2322601

Request Parameters

None

Example Response

{
  "block_id": {
    "hash": "AEF267A96586B10F8911B4B13934C31887DBEF03757A44B538C88DB87A5EEE83",
    "parts": {
      "total": "1",
      "hash": "9A119B06F376BB6080FE80516130FEA25498EB59A60A04E7CE4CA09AE5A1DA32"
    }
  },
  "block": {
    "header": {
      "version": {
        "block": "10",
        "app": "0"
      },
      "chain_id": "exchain-66",
      "height": "2322601",
      "time": "2021-01-15T12:00:00Z",
      "last_block_id": {
        "hash": "",
        "parts": {
          "total": "0",
          "hash": ""
        }
      },
      "last_commit_hash": "",
      "data_hash": "",
      "validators_hash": "106BA08C88D75667552A7726EDD3ABF65A3B183935D9BACB40128939EC2B3E30",
      "next_validators_hash": "106BA08C88D75667552A7726EDD3ABF65A3B183935D9BACB40128939EC2B3E30",
      "consensus_hash": "048091BC7DDC283F77BFBF91D73C44DA58C3DF8A9CBC867405D8B7F3DAADA22F",
      "app_hash": "",
      "last_results_hash": "",
      "evidence_hash": "",
      "proposer_address": "32409E2BBF7F551EC182769BD142B2F262B261F0"
    },
    "data": {
      "txs": null
    },
    "evidence": {
      "evidence": null
    },
    "last_commit": {
      "height": "0",
      "round": "0",
      "block_id": {
        "hash": "",
        "parts": {
          "total": "0",
          "hash": ""
        }
      },
      "signatures": null
    }
  }
}

Response Parameters

Parameter Type Description
block_id Object
> parts Object
>> total String
>> hash String
> hash String
block Object
> data Object
>> txs String
> evidence Object
>> evidence String
> last_commit Object
>> round String
>> block_id Object
>>> parts Object
>>>> total String
>>>> hash String
>>> hash String
>> signatures String
>> height String
> header Object
>> validators_hash String
>> chain_id String
>> consensus_hash String
>> proposer_address String
>> next_validators_hash String
>> version Object
>>> app String
>>> block String
>> data_hash String
>> last_results_hash String
>> last_block_id Object
>>> parts Object
>>>> total String
>>>> hash String
>>> hash String
>> evidence_hash String
>> app_hash String
>> time String
>> height String
>> last_commit_hash String

Get latest validatorsets

Get the latest validator set

Rate Limit: 6 requests per second

HTTP Request

GET okexchain/v1/validatorsets/latest

Request Example

https://www.okex.com/okexchain/v1/validatorsets/latest

Request Parameters

None

Example Response

{
    "block_height": "3323070",
    "validators": [{
        "address": "exvalcons1pl5u7tl6cw8hhnzssx9ekscllxf5e9vhu73l6w",
        "pub_key": "exvalconspub1zcjduepqu6473zvyzy3zwhmdhd38z7cdkw7wf50hdztngrndhxgr8xrqhrrq0m3nhf",
        "proposer_priority": "-57762372464786",
        "voting_power": "9023435617112"
    }, {
        "address": "exvalcons1rs4mjp0fkmmadwrz2pmum92upudrhgpx2cwjrk",
        "pub_key": "exvalconspub1zcjduepqllecydfvumn0swfx7mvyjtxepnsaqwm6qu4n0294st82qrc4zd8qtmeftd",
        "proposer_priority": "16694606781697",
        "voting_power": "9019397216795"
    }, {
        "address": "exvalcons1yp4uvrtqynx0usrzecwntrzm5xxdeg5ycgw6zq",
        "pub_key": "exvalconspub1zcjduepqgczr87k588khjz87z0fagqyqz4ua6alevq2hcfdldv5wmx4293xsuhhmk3",
        "proposer_priority": "26311446727052",
        "voting_power": "9035970427713"
    }, {
        "address": "exvalcons19kj5t922d9hc7zdw7fdwmc4smhs6v7mqxv09ny",
        "pub_key": "exvalconspub1zcjduepqk93rdqd8lkknq7rhr5pfnzj7px0knpqw85jycsqdj7xvc950q5vqdqu4rx",
        "proposer_priority": "6594921836654",
        "voting_power": "9040433129887"
    }, {
        "address": "exvalcons1xfqfu2al0a23asvzw6dazs4j7f3tyc0stgxe7w",
        "pub_key": "exvalconspub1zcjduepqgw849shr86xu0zqgfur0wqsws3xer5ckfy0k5ga969wxqfmllz0q39yrch",
        "proposer_priority": "-10037501532742",
        "voting_power": "9039088117292"
    }, {
        "address": "exvalcons1x0a2sz4p0ajp96zefm2y0wksj32224avzy2g4z",
        "pub_key": "exvalconspub1zcjduepqp7ul8pfremls80jvqdnqe3cy56avzgj25jjqz0luz3cjzlp8a3ssur08mt",
        "proposer_priority": "-86691862550180",
        "voting_power": "1899440874312"
    }, {
        "address": "exvalcons1g4khphwstda0gqmfl2llm7kvyy66553jn5x7jq",
        "pub_key": "exvalconspub1zcjduepqv6anlah0pedc6wpdmphlhnzh85yxalpwgwf9zk6enjxh5pg0swfs9e5nj3",
        "proposer_priority": "75054887912278",
        "voting_power": "9024728174216"
    }, {
        "address": "exvalcons12vzv2s9dwm7390ez3scdezy66tuq5e0ussvzsn",
        "pub_key": "exvalconspub1zcjduepqk7wrtvrx0wwm8a3jyvfth2gl37g7ldal8sn0ydvjv2vxawyflw4s49xuv2",
        "proposer_priority": "31599784388253",
        "voting_power": "1740951196392"
    }, {
        "address": "exvalcons1d97rmwj60eejddtqujtddaaejf9zdmgmuglxef",
        "pub_key": "exvalconspub1zcjduepqqfwzk69r2nt7xcqjzmjvwuxaelevsdjftgqk8wafmdqr9ac9gd0ssukkrn",
        "proposer_priority": "105085597421655",
        "voting_power": "9037541576976"
    }, {
        "address": "exvalcons1d03femmrmygp8ew7ssryhtrm9h3t3w2fc9mkdd",
        "pub_key": "exvalconspub1zcjduepqrtlw4twnhr5ckjzuzh3t0wkfvzqv67mnk4pkz645gaqclevzn7lqaf37v9",
        "proposer_priority": "-62384223420978",
        "voting_power": "9035716254611"
    }, {
        "address": "exvalcons10ts55qgna9ffrjehu4mn56v6q82sw8qaxzdlap",
        "pub_key": "exvalconspub1zcjduepq2qcpnzz98rtn5afqqlymdmd2ywkyt3pqwyduskdyayt248znu2rq7dmrmx",
        "proposer_priority": "-52991264712726",
        "voting_power": "1861350512766"
    }, {
        "address": "exvalcons1kz83a8xehkknaw9wasm7qe32hnrsh7e78xmaz7",
        "pub_key": "exvalconspub1zcjduepqw2ey0qhr9tq6m5nvrsu00ww4gtwa56gm4w49rksfgpngsgqz9rwsvq4s86",
        "proposer_priority": "15117501667285",
        "voting_power": "9017198148877"
    }, {
        "address": "exvalcons1k5nssefrc2ctpya7eljz63tjndnhtatd9ytk3p",
        "pub_key": "exvalconspub1zcjduepqy5067ef9j9rlk6keue8pejycu6vlr85q5a9x4kkpwa0wg56ngp4q6h0cr7",
        "proposer_priority": "51601623656330",
        "voting_power": "9033670263983"
    }, {
        "address": "exvalcons1hpvx0zd4dqgknfkdcec8wkkg8l6kp230fx7sds",
        "pub_key": "exvalconspub1zcjduepqks93pmhg3aqak0unyx28vgwhnh9vhtapddm75uax4ls2z2frfunsd9mnrx",
        "proposer_priority": "-53636230495574",
        "voting_power": "9022111028969"
    }, {
        "address": "exvalcons1cy46guvlpufy63xdrjpq77nauk4zwf80e62pvy",
        "pub_key": "exvalconspub1zcjduepqg97q5h96s3tqnsyhs4ls94zyx7t6xkd6hrg9cmzzm0fvclstghvq3qlc6j",
        "proposer_priority": "-54693560914389",
        "voting_power": "9031739052368"
    }, {
        "address": "exvalcons1c8fjmh7rcrqx7397ayze840dw5uatwsj8ly48h",
        "pub_key": "exvalconspub1zcjduepqyzlcq82epx9sm3udg322xsurg2fuad9gdf4f87zclm6yap2qrppsu8lmdq",
        "proposer_priority": "68112765077107",
        "voting_power": "9026049970407"
    }, {
        "address": "exvalcons1ccj2ag967jah6edjqjmd2rfx6rg27hdqg9xdsz",
        "pub_key": "exvalconspub1zcjduepqkx07ggrk37tu3jcks0rsx04ztpwxdk6ykffs39t3dpn38nqfqxtq7ahgzz",
        "proposer_priority": "604157602850",
        "voting_power": "9031295646549"
    }, {
        "address": "exvalcons16eaeh29e85t2szely2xemh80hmqyv0gsxnggy8",
        "pub_key": "exvalconspub1zcjduepqm608y3qu6vkrahlralhy0km4gz0299nqk2uutftg00svr73q7e5ssytssw",
        "proposer_priority": "7012325625380",
        "voting_power": "9027483430214"
    }, {
        "address": "exvalcons1672cupp63l8ljszlqslplrhlh8q3glmqvq5sd0",
        "pub_key": "exvalconspub1zcjduepq4p7mgjsyszl74agwv4swpl23klvtl0gn7vmfy3cz36yh87qusuesek95hn",
        "proposer_priority": "29447753636571",
        "voting_power": "9015886244593"
    }, {
        "address": "exvalcons1u0uvv9mnxlwgj333uupds92thmy6jvw4c78d8v",
        "pub_key": "exvalconspub1zcjduepqpmdpu2gwxe5x3hpcl66ehek4fjdqa23aunsj8gs3ug94yvrx8adsa8tqhk",
        "proposer_priority": "550426775773",
        "voting_power": "9028804932486"
    }, {
        "address": "exvalcons1us3k35mdad096e5zsk88xrnrq993egk90f6k5r",
        "pub_key": "exvalconspub1zcjduepqnlmt2qhdn2hghculh34gxukx4gac7q7pl24knglc0lqpsrrph6ps6e7pwh",
        "proposer_priority": "-55590783017492",
        "voting_power": "9020781309467"
    }]
}

Response Parameters

Parameter Type Description
block_height String
validators Array
> address String
> proposer_priority String
> pub_key String
> voting_power String

Get node Info

Get Information about the connected node

Rate Limit: 6 requests per second

HTTP Request

GET okexchain/v1/node_info

Request Example

https://www.okex.com/okexchain/v1/node_info

Request Parameters

None

Example Response

{
    "node_info": {
        "protocol_version": {
            "p2p": "7",
            "block": "10",
            "app": "0"
        },
        "id": "4466b04f1cf2b55bc8e4225eef72b487a37e3c4f",
        "listen_addr": "tcp://10.1.19.206:20256",
        "network": "exchain-66",
        "version": "0.33.9",
        "channels": "4020212223303800",
        "moniker": "2061",
        "other": {
            "tx_index": "on",
            "rpc_address": "tcp://0.0.0.0:26657"
        }
    },
    "application_version": {
        "name": "exchain",
        "server_name": "exchaind",
        "client_name": "exchaincli",
        "version": "v0.18.6",
        "commit": "2ccd81b14f146a5afd3a52aa9f890cf88988f2a5",
        "build_tags": "netgo",
        "go": "go version go1.16.4 linux/amd64",
        "build_deps": ["github.com/99designs/[email protected]", "github.com/ChainSafe/[email protected]", "github.com/Comcast/[email protected]", "github.com/VictoriaMetrics/[email protected]", "github.com/Workiva/[email protected]", "github.com/aliyun/[email protected]", "github.com/aliyun/[email protected]+incompatible", "github.com/aristanetworks/[email protected]", "github.com/bartekn/[email protected]", "github.com/beorn7/[email protected]", "github.com/bgentry/[email protected]", "github.com/btcsuite/[email protected]", "github.com/btcsuite/[email protected]", "github.com/buger/[email protected]", "github.com/cespare/xxhash/[email protected]", "github.com/cosmos/[email protected] =\u003e github.com/okex/[email protected]", "github.com/cosmos/[email protected]", "github.com/davecgh/[email protected]", "github.com/deckarep/[email protected]", "github.com/dvsekhvalnov/[email protected]", "github.com/enigmampc/[email protected]", "github.com/ethereum/[email protected]", "github.com/fsnotify/[email protected]", "github.com/garyburd/[email protected]", "github.com/go-errors/[email protected]", "github.com/go-kit/[email protected]", "github.com/go-logfmt/[email protected]", "github.com/go-redis/[email protected]+incompatible", "github.com/go-sql-driver/[email protected]", "github.com/go-stack/[email protected]", "github.com/godbus/[email protected]", "github.com/gogo/[email protected]", "github.com/golang/[email protected].2", "github.com/golang/[email protected]", "github.com/google/[email protected]", "github.com/google/[email protected]", "github.com/gorilla/[email protected]", "github.com/gorilla/[email protected]", "github.com/gorilla/[email protected]", "github.com/gsterjov/[email protected]", "github.com/gtank/[email protected]", "github.com/gtank/[email protected]", "github.com/hashicorp/[email protected]", "github.com/hashicorp/[email protected]", "github.com/holiman/[email protected]", "github.com/jinzhu/[email protected]", "github.com/jinzhu/[email protected]", "github.com/jmespath/[email protected]", "github.com/json-iterator/[email protected]", "github.com/lestrrat/[email protected]", "github.com/lestrrat/[email protected]", "github.com/libp2p/[email protected]", "github.com/magiconair/[email protected]", "github.com/mattn/[email protected]", "github.com/mattn/[email protected]", "github.com/mattn/[email protected]", "github.com/matttproud/[email protected]", "github.com/mimoo/[email protected]", "github.com/minio/[email protected]", "github.com/mitchellh/[email protected]", "github.com/mitchellh/[email protected]", "github.com/modern-go/[email protected]", "github.com/modern-go/[email protected]", "github.com/mtibben/[email protected]", "github.com/nacos-group/[email protected]", "github.com/olekukonko/[email protected]", "github.com/pborman/[email protected]", "github.com/pelletier/[email protected]v1.6.0", "github.com/pkg/[email protected]", "github.com/pmezard/[email protected]", "github.com/prometheus/[email protected]", "github.com/prometheus/[email protected]", "github.com/prometheus/[email protected]", "github.com/prometheus/[email protected]", "github.com/prometheus/[email protected]", "github.com/rakyll/[email protected]", "github.com/rcrowley/[email protected]", "github.com/rjeczalik/[email protected]", "github.com/rs/[email protected]", "github.com/segmentio/[email protected]", "github.com/shirou/[email protected]+incompatible", "github.com/shopspring/[email protected]", "github.com/spf13/[email protected]", "github.com/spf13/[email protected]", "github.com/spf13/[email protected]", "github.com/spf13/[email protected]", "github.com/spf13/[email protected]", "github.com/spf13/[email protected]", "github.com/status-im/[email protected]", "github.com/steakknife/[email protected]", "github.com/steakknife/[email protected]", "github.com/stretchr/[email protected]", "github.com/subosito/[email protected]", "github.com/syndtr/[email protected]", "github.com/tendermint/[email protected]", "github.com/tendermint/[email protected]", "github.com/tendermint/[email protected]", "github.com/tendermint/[email protected] =\u003e github.com/okex/[email protected]", "github.com/tendermint/[email protected] =\u003e github.com/okex/[email protected]", "github.com/tendermint/[email protected]", "github.com/toolkits/[email protected]", "github.com/tyler-smith/[email protected]0.1-0.20181017060643-dbb3b84ba2ef", "github.com/willf/[email protected]", "go.uber.org/[email protected]", "go.uber.org/[email protected]", "go.uber.org/[email protected]", "golang.org/x/[email protected]", "golang.org/x/[email protected]", "golang.org/x/[email protected]", "golang.org/x/[email protected]", "golang.org/x/[email protected]", "google.golang.org/[email protected]", "google.golang.org/[email protected]", "google.golang.org/[email protected]", "gopkg.in/[email protected]", "gopkg.in/[email protected]", "gopkg.in/[email protected]"],
        "cosmos_sdk": "v0.39.2",
        "tendermint": "v0.33.9"
    }
}

Response Parameters

Parameter Type Description
application_version Object
> server_name String
> name String
> commit String
> go String
> cosmos_sdk String
> build_deps Array
> tendermint String
> client_name String
> version String
> build_tags String
node_info Object
> protocol_version Object
>> app String
>> block String
>> p2p String
> other Object
>> tx_index String
>> rpc_address String
> channels String
> listen_addr String
> id String
> moniker String
> version String
> network String

Get Tx Info

Get Tx information by Tx hash

Rate Limit: 6 requests per second

HTTP Request

GET okexchain/v1/txs/{hash}

Request Example

https://www.okex.com/okexchain/v1/txs/0x9C19D09361F01296EE5FB910634C08C8329414A90965317605B34C209DB19624

Request Parameters

None

Example Response

{
    "blockHash": "0x35b8a059fbb641b8515a6eab65112a8d95f851bad598543a55a13885e9a0d552",
    "blockNumber": "0x29237d",
    "from": "0xd830c50dbfa92b296c55ef30ad3b0c6f7f344aec",
    "gas": "0x3f962",
    "gasPrice": "0x47868c00",
    "hash": "0x9c19d09361f01296ee5fb910634c08c8329414a90965317605b34c209db19624",
    "input": "0x95d1383800000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000ef71ca2ee68f45b9ad6f72fbdb33d707b872315c0000000000000000000000009b99c3ce751aa292320033f93a1376902d4ba58b000000000000000000000000fa520efc34c81bfc1e3dd48b7fe9ff326049f986000000000000000000000000abc732f6f69a519f6d508434481376b6221eb7d500000000000000000000000021cde7e32a6caf4742d00d44b07279e7596d26b900000000000000000000000059d226bb0a4d74274d4354ebb6a0e1a1aa5175b60000000000000000000000008c340697d2e320311d30db03782151b28f4cf7820000000000000000000000008f8526dbfd6e38e3d8307702ca8469bae6c56c1500000000000000000000000054e4622dc504176b3bb432dccaf504569699a7ff000000000000000000000000df54b6c6195ea4d948d03bfd818d365cf175cfc20000000000000000000000003f8969be2fc0770dcc174968e4b4ff146e0acdaf0000000000000000000000002218e0d5e0173769f5b4939a3ae423f7e5e4eab7000000000000000000000000dcac52e001f5bd413aa6ea83956438f29098166b000000000000000000000000c946daf81b08146b1c7a8da2a851ddf2b3eaaf85000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000d4d1fd514b4e09b5980000000000000000000000000000000000000000000000027e3278e43ab97acc00000000000000000000000000000000000000000000001367ef8f9a9a65c000000000000000000000000000000000000000000000000001fb0f13e2cad5c2cc0000000000000000000000000000000000000000000000000de12b6b96230598000000000000000000000000000000000000000000000001fcee4e62571ff00000000000000000000000000000000000000000000000000000001f608082219800000000000000000000000000000000000000000000000b0188ce742a7ce000000000000000000000000000000000000000000000000bb10d919ef93659e000000000000000000000000000000000000000000000000001db86902bf335159800000000000000000000000000000000000000000000000782da20c8f733d598000000000000000000000000000000000000000000000000c2aa9ac67b9922cc0000000000000000000000000000000000000000000000000ddfabfeb40c40a80000000000000000000000000000000000000000000000000dde6fde043272cc",
    "nonce": "0x13dc",
    "to": "0x21a276b169f51a0725dbc708c09ea7e1c4d94488",
    "transactionIndex": "0x0",
    "value": "0x0",
    "v": "0xa7",
    "r": "0x4b383ec9a9198f019ca33a53b2192865201a5ef366ae02ffd26e510f85458b08",
    "s": "0x1aea872d825dceb3f6ca8fcccfac500dc0644d67eb803281ca27c26f8242c304"
}

Response Parameters

Parameter Type Description
gasPrice String
hash String
value String
to String
from String
gas String
blockNumber String
v String
s String
r String
input String
nonce String
transactionIndex String
blockHash String

Get validatorsets

Get the latest validator set

Rate Limit: 6 requests per second

HTTP Request

GET okexchain/v1/validatorsets/{height}

Request Example

https://www.okex.win/okexchain/v1/validatorsets/2697221

Request Parameters

None

Example Response

{
  "block_height": "2697221",
  "validators": [
    {
      "address": "exvalcons1pl5u7tl6cw8hhnzssx9ekscllxf5e9vhu73l6w",
      "pub_key": "exvalconspub1zcjduepqu6473zvyzy3zwhmdhd38z7cdkw7wf50hdztngrndhxgr8xrqhrrq0m3nhf",
      "proposer_priority": "47638082485597",
      "voting_power": "8928485820324"
    },
    {
      "address": "exvalcons1rs4mjp0fkmmadwrz2pmum92upudrhgpx2cwjrk",
      "pub_key": "exvalconspub1zcjduepqllecydfvumn0swfx7mvyjtxepnsaqwm6qu4n0294st82qrc4zd8qtmeftd",
      "proposer_priority": "-11717811164568",
      "voting_power": "8924447091464"
    },
    {
      "address": "exvalcons1yp4uvrtqynx0usrzecwntrzm5xxdeg5ycgw6zq",
      "pub_key": "exvalconspub1zcjduepqgczr87k588khjz87z0fagqyqz4ua6alevq2hcfdldv5wmx4293xsuhhmk3",
      "proposer_priority": "-66887003646092",
      "voting_power": "8941020162109"
    },
    {
      "address": "exvalcons19kj5t922d9hc7zdw7fdwmc4smhs6v7mqxv09ny",
      "pub_key": "exvalconspub1zcjduepqk93rdqd8lkknq7rhr5pfnzj7px0knpqw85jycsqdj7xvc950q5vqdqu4rx",
      "proposer_priority": "-53429103469247",
      "voting_power": "8945483192825"
    },
    {
      "address": "exvalcons1xfqfu2al0a23asvzw6dazs4j7f3tyc0stgxe7w",
      "pub_key": "exvalconspub1zcjduepqgw849shr86xu0zqgfur0wqsws3xer5ckfy0k5ga969wxqfmllz0q39yrch",
      "proposer_priority": "-59773971759003",
      "voting_power": "8944137851687"
    },
    {
      "address": "exvalcons1x0a2sz4p0ajp96zefm2y0wksj32224avzy2g4z",
      "pub_key": "exvalconspub1zcjduepqp7ul8pfremls80jvqdnqe3cy56avzgj25jjqz0luz3cjzlp8a3ssur08mt",
      "proposer_priority": "-27281552372722",
      "voting_power": "1816470879930"
    },
    {
      "address": "exvalcons1g4khphwstda0gqmfl2llm7kvyy66553jn5x7jq",
      "pub_key": "exvalconspub1zcjduepqv6anlah0pedc6wpdmphlhnzh85yxalpwgwf9zk6enjxh5pg0swfs9e5nj3",
      "proposer_priority": "34328204085167",
      "voting_power": "8929778377427"
    },
    {
      "address": "exvalcons12vzv2s9dwm7390ez3scdezy66tuq5e0ussvzsn",
      "pub_key": "exvalconspub1zcjduepqk7wrtvrx0wwm8a3jyvfth2gl37g7ldal8sn0ydvjv2vxawyflw4s49xuv2",
      "proposer_priority": "-47582304935826",
      "voting_power": "1580739072371"
    },
    {
      "address": "exvalcons1d97rmwj60eejddtqujtddaaejf9zdmgmuglxef",
      "pub_key": "exvalconspub1zcjduepqqfwzk69r2nt7xcqjzmjvwuxaelevsdjftgqk8wafmdqr9ac9gd0ssukkrn",
      "proposer_priority": "24286871104272",
      "voting_power": "8942591311372"
    },
    {
      "address": "exvalcons1d03femmrmygp8ew7ssryhtrm9h3t3w2fc9mkdd",
      "pub_key": "exvalconspub1zcjduepqrtlw4twnhr5ckjzuzh3t0wkfvzqv67mnk4pkz645gaqclevzn7lqaf37v9",
      "proposer_priority": "4209895378605",
      "voting_power": "8940766457823"
    },
    {
      "address": "exvalcons10ts55qgna9ffrjehu4mn56v6q82sw8qaxzdlap",
      "pub_key": "exvalconspub1zcjduepq2qcpnzz98rtn5afqqlymdmd2ywkyt3pqwyduskdyayt248znu2rq7dmrmx",
      "proposer_priority": "-98906929598155",
      "voting_power": "1651296571160"
    },
    {
      "address": "exvalcons1kz83a8xehkknaw9wasm7qe32hnrsh7e78xmaz7",
      "pub_key": "exvalconspub1zcjduepqw2ey0qhr9tq6m5nvrsu00ww4gtwa56gm4w49rksfgpngsgqz9rwsvq4s86",
      "proposer_priority": "33136674257290",
      "voting_power": "8922248352089"
    },
    {
      "address": "exvalcons1k5nssefrc2ctpya7eljz63tjndnhtatd9ytk3p",
      "pub_key": "exvalconspub1zcjduepqy5067ef9j9rlk6keue8pejycu6vlr85q5a9x4kkpwa0wg56ngp4q6h0cr7",
      "proposer_priority": "67158700502611",
      "voting_power": "8938720467195"
    },
    {
      "address": "exvalcons1hpvx0zd4dqgknfkdcec8wkkg8l6kp230fx7sds",
      "pub_key": "exvalconspub1zcjduepqks93pmhg3aqak0unyx28vgwhnh9vhtapddm75uax4ls2z2frfunsd9mnrx",
      "proposer_priority": "48959031615518",
      "voting_power": "8927161232181"
    },
    {
      "address": "exvalcons1cy46guvlpufy63xdrjpq77nauk4zwf80e62pvy",
      "pub_key": "exvalconspub1zcjduepqg97q5h96s3tqnsyhs4ls94zyx7t6xkd6hrg9cmzzm0fvclstghvq3qlc6j",
      "proposer_priority": "6970694512149",
      "voting_power": "8936789255579"
    },
    {
      "address": "exvalcons1c8fjmh7rcrqx7397ayze840dw5uatwsj8ly48h",
      "pub_key": "exvalconspub1zcjduepqyzlcq82epx9sm3udg322xsurg2fuad9gdf4f87zclm6yap2qrppsu8lmdq",
      "proposer_priority": "31805356122365",
      "voting_power": "8931100101565"
    },
    {
      "address": "exvalcons1ccj2ag967jah6edjqjmd2rfx6rg27hdqg9xdsz",
      "pub_key": "exvalconspub1zcjduepqkx07ggrk37tu3jcks0rsx04ztpwxdk6ykffs39t3dpn38nqfqxtq7ahgzz",
      "proposer_priority": "6690328744154",
      "voting_power": "8936345849761"
    },
    {
      "address": "exvalcons16eaeh29e85t2szely2xemh80hmqyv0gsxnggy8",
      "pub_key": "exvalconspub1zcjduepqm608y3qu6vkrahlralhy0km4gz0299nqk2uutftg00svr73q7e5ssytssw",
      "proposer_priority": "-94450872539121",
      "voting_power": "8932533633426"
    },
    {
      "address": "exvalcons1672cupp63l8ljszlqslplrhlh8q3glmqvq5sd0",
      "pub_key": "exvalconspub1zcjduepq4p7mgjsyszl74agwv4swpl23klvtl0gn7vmfy3cz36yh87qusuesek95hn",
      "proposer_priority": "37677632023734",
      "voting_power": "8920932531050"
    },
    {
      "address": "exvalcons1u0uvv9mnxlwgj333uupds92thmy6jvw4c78d8v",
      "pub_key": "exvalconspub1zcjduepqpmdpu2gwxe5x3hpcl66ehek4fjdqa23aunsj8gs3ug94yvrx8adsa8tqhk",
      "proposer_priority": "68803590178606",
      "voting_power": "8933855135698"
    },
    {
      "address": "exvalcons1us3k35mdad096e5zsk88xrnrq993egk90f6k5r",
      "pub_key": "exvalconspub1zcjduepqnlmt2qhdn2hghculh34gxukx4gac7q7pl24knglc0lqpsrrph6ps6e7pwh",
      "proposer_priority": "48364488474677",
      "voting_power": "8925831512679"
    }
  ]
}

Response Parameters

Parameter Type Description
block_height String
validators Array
> address String
> proposer_priority String
> pub_key String
> voting_power String

Staking

The API endpoints of Staking .

Get delegator Info

Query information of a delegator

Rate Limit: 6 requests per second

HTTP Request

GET okexchain/v1/staking/delegators/{delegatorAddr}

Request Example

https://www.okex.win/okexchain/v1/staking/delegators/ex17se79kf0c9t5sw0yg0jjdm6et79sy8aradphtg

Request Parameters

None

Example Response

{
  "delegator_address": "ex17se79kf0c9t5sw0yg0jjdm6et79sy8aradphtg",
  "validator_address": [
    "exvaloper19e6edpu97d6w2t5dlp7lph2fkdja0lvlj8ngk0",
    "exvaloper18v23ln9ycrtg0mrwsm004sh4tdknudtdapcfcq",
    "exvaloper1ucmx6vvtrwam9pg20fnwmy9z80uhchyxqn67wq",
    "exvaloper1tat4lam8wjqmeax9mv4s584vu2mp7c0cgvlajl",
    "exvaloper1rz7frqz9ky52qqjwlpawfe5hz6plcrmmpha0px",
    "exvaloper1w3ptfgekjgdvwkqmdepdeyvuxqmcplfszlz3jm",
    "exvaloper104y8sy0r6fke4a9qr8u05j6v5y68gkh4v3ud9t",
    "exvaloper1qva0ejf0t943x6rt824gwmvtjgec9cjrut5wn8"
  ],
  "shares": "72053.451006669074462727",
  "tokens": "0.024951000000000000",
  "is_proxy": false,
  "total_delegated_tokens": "0.000000000000000000",
  "proxy_address": ""
}

Response Parameters

Parameter Type Description
is_proxy String
tokens String
proxy_address String
validator_address Array
total_delegated_tokens String
delegator_address String
shares String

Get operator address

Query corresponding operator_address through validator_address

Rate Limit: 6 requests per second

HTTP Request

GET okexchain/v1/v1/staking/address/{operator_addr}/validator_address

Request Example

https://www.okex.com/okexchain/v1/staking/address/B8586789B5681169A6CDC670775AC83FF560AA2F/validator_address

Request Parameters

None

Example Response

"exvaloper1q9nct2gska2yutx24starv6s63xz022fdwdgzv"

Response Parameters

Parameter Type Description
address String

Get operator and validator pairs

Query information on all validators

Rate Limit: 6 requests per second

HTTP Request

GET okexchain/v1/staking/address

Request Example

https://www.okex.com/okexchain/v1/staking/address

Request Parameters

None

Example Response

[{
        "operator_address": "exvaloper1q9nct2gska2yutx24starv6s63xz022fdwdgzv",
        "validator_address": "B8586789B5681169A6CDC670775AC83FF560AA2F"
    },
    {
        "operator_address": "exvaloper1qva0ejf0t943x6rt824gwmvtjgec9cjrut5wn8",
        "validator_address": "C1D32DDFC3C0C06F44BEE90593D5ED7539D5BA12"
    },
    {
        "operator_address": "exvaloper1pc864zshkvsgc724k5jffcjsrmhz63m6gwrrhh",
        "validator_address": "49023DF452630B38D1F638273BF40F72D7A91EB9"
    },
    {
        "operator_address": "exvaloper1zza3jrylyecrtuh0p9ts2xauzsefuvwa4l9fsx",
        "validator_address": "E3F8C6177337DC894631E702D8154BBEC9A931D5"
    },
    {
        "operator_address": "exvaloper1zxthrcdcecfe5ss4tal0tq30hzel2lks6psuhm",
        "validator_address": "E42368D36DEB5E5D6682858E730E63014B1CA2C5"
    },
    {
        "operator_address": "exvaloper1rz7frqz9ky52qqjwlpawfe5hz6plcrmmpha0px",
        "validator_address": "9B2CAB86E170002ABAFA11AD029CF87678CAAD95"
    },
    {
        "operator_address": "exvaloper1rr253al2mtdgfcjwh7j3778g5gru3elyumxj8m",
        "validator_address": "D2B872B9EC08B28C91831BD01B013196987C6204"
    },
    {
        "operator_address": "exvaloper1rv8tjxp8d8ucuak8c7svewwugzfdjwf9arju5j",
        "validator_address": "6DA0DDD71603F4874FFFB2C3808CD0B5F7320167"
    },
    {
        "operator_address": "exvaloper1rmrx7wp60almzvghx2820aamjfd4kgwlcx542p",
        "validator_address": "EE694A82C1828483F46348A0EB5862DE1DD10DA6"
    },
    {
        "operator_address": "exvaloper1ygcvtcqxl82xvzrq25dymam434k3nnc8kwvrkm",
        "validator_address": "6BE29CEF63D91013E5DE84064BAC7B2DE2B8B949"
    },
    {
        "operator_address": "exvaloper19wln93k3faq7vkqzlc9gljr3ey5fljt93jfxsy",
        "validator_address": "456D70DDD05B7AF40369FABFFDFACC2135AA5232"
    },
    {
        "operator_address": "exvaloper195ez67wmhprwrru34gvttyd8ttpl7edx3px8ua",
        "validator_address": "0FE9CF2FFAC38F7BCC50818B9B431FF9934C9597"
    },
    {
        "operator_address": "exvaloper19e6edpu97d6w2t5dlp7lph2fkdja0lvlj8ngk0",
        "validator_address": "D7958E043A8FCFF9405F043E1F8EFFB9C1147F60"
    },
    {
        "operator_address": "exvaloper1xkl5agjzqnjnptyat2dng2asmx8g5kllg7xamv",
        "validator_address": "2DA545954A696F8F09AEF25AEDE2B0DDE1A67B60"
    },
    {
        "operator_address": "exvaloper1xaxvu9wxr8szym3aqdesvqq968y2tf53l8fyak",
        "validator_address": "3A2794CC9C60BC3DE6812C1665FADEE8E6D1E0D6"
    },
    {
        "operator_address": "exvaloper188dhgmaq8cka2yczzjfzsw0nely6y8uap4u5kg",
        "validator_address": "33FAA80AA17F6412E8594ED447BAD09454A557AC"
    },
    {
        "operator_address": "exvaloper18v23ln9ycrtg0mrwsm004sh4tdknudtdapcfcq",
        "validator_address": "E1A887691AFEE37AF64FCEE9CE80B35178A8C8E2"
    },
    {
        "operator_address": "exvaloper18w9mggs2s5t8ve0zr0ctjcyq7faft3qp8dlj75",
        "validator_address": "6CDB634FDDB970BBC4E10DF0F29274DB2D298DF3"
    },
    {
        "operator_address": "exvaloper18au05qx485u2qcw2gvqsrfh29evq77lm9u2jwr",
        "validator_address": "B08F1E9CD9BDAD3EB8AEEC37E0662ABCC70BFB3E"
    },
    {
        "operator_address": "exvaloper1g3a6vtau2k93n4tqgqnrggeu3qa4x20rgs4x4s",
        "validator_address": "26A3A71528117598DA8CAECE3B5CB4D41264D648"
    },
    {
        "operator_address": "exvaloper1fymxn4gazxzjdfvwvr0ccnrnjpwmj0r9vw3t2y",
        "validator_address": "32409E2BBF7F551EC182769BD142B2F262B261F0"
    },
    {
        "operator_address": "exvaloper1fwvre7w2na66fq3k2wjy30rzp07c4fl99v3hsw",
        "validator_address": "09A02E61153A22BDB19B69C79357E9596C0FA406"
    },
    {
        "operator_address": "exvaloper1fj2wlj8lwy4hd8ngfzntku0r38wxz2wt96awnp",
        "validator_address": "6FED194F7C8BE04ACD4E76271E8C4C3780F86869"
    },
    {
        "operator_address": "exvaloper1tzxmqa6dqlpeq2s34c8f6n4amuuwj8gnx8vr9q",
        "validator_address": "B7B08047944713E21B62A24115607DCBC0D61EF3"
    },
    {
        "operator_address": "exvaloper1tkwxgcpvptua0q0h5tn0at58ufnjdue7xp9jh4",
        "validator_address": "206BC60D6024CCFE4062CE1D358C5BA18CDCA284"
    },
    {
        "operator_address": "exvaloper1tat4lam8wjqmeax9mv4s584vu2mp7c0cgvlajl",
        "validator_address": "5F45AD27AF7C5718BF36678BAC9FBBD0623C264F"
    },
    {
        "operator_address": "exvaloper1vsjcts3ga8dgf6nj2q7vmlrnu5en4cneaskg9w",
        "validator_address": "5304C540AD76FD12BF228C30DC889AD2F80A65FC"
    },
    {
        "operator_address": "exvaloper1v5pvu4rkzc5axd6f7ngxa39je6d0lyujky5tng",
        "validator_address": "E303C3040B2374405D29EEB3B6E659BA4BCE2E2A"
    },
    {
        "operator_address": "exvaloper1v4kagglr3vq82vqywqd8quhsuarkm4kf2nz85r",
        "validator_address": "4E40AC623F479A4FA783703A2338F10821C574E3"
    },
    {
        "operator_address": "exvaloper1vlzgq74y6hm9crhkkhdjy77uvyqa0zdupstsqj",
        "validator_address": "7AE14A0113E95291CB37E5773A699A01D5071C1D"
    },
    {
        "operator_address": "exvaloper1w3ptfgekjgdvwkqmdepdeyvuxqmcplfszlz3jm",
        "validator_address": "718EABE12152C41E0F0DA01259F994C49BF3088C"
    },
    {
        "operator_address": "exvaloper1w5zu7xxzfdx729elg2lu4rnltjsvzpdg3dhpaf",
        "validator_address": "D129F169D41E5168F287BE7E174FC8ADA795C990"
    },
    {
        "operator_address": "exvaloper104y8sy0r6fke4a9qr8u05j6v5y68gkh4v3ud9t",
        "validator_address": "83E68B475E906B3F1A0ED07C537ACE9DE4EEBFB7"
    },
    {
        "operator_address": "exvaloper1079vd72hpvlhnt7yjdya50egxkdr4dtureduuf",
        "validator_address": "2538B193B3BD9BB7FF22DD693B0CDC94979F8189"
    },
    {
        "operator_address": "exvaloper1s6nfs7mlj7ewsskkrmekqhpq2w234fcz5uq4m5",
        "validator_address": "1C2BB905E9B6F7D6B8625077CD955C0F1A3BA026"
    },
    {
        "operator_address": "exvaloper1su2ks3x0xnh6hpgg7s8rv6kgd5set0d022l24z",
        "validator_address": "E64D13E00C08548CD4444869B018EA90A2DF742D"
    },
    {
        "operator_address": "exvaloper13mayrjzsrp976y0ae0qw8sjan3qg2xfdeq8vmh",
        "validator_address": "9F200A2080BABAD093746F6FAB1E28CDF7F5C669"
    },
    {
        "operator_address": "exvaloper1ja9xngm4zh0t442mse73ll30p7dczd49s88n2x",
        "validator_address": "C624AEA0BAF4BB7D65B204B6D50D26D0D0AF5DA0"
    },
    {
        "operator_address": "exvaloper1nx6grwxsanpwfghzu40e4ng5xqktuj2rh498pe",
        "validator_address": "B696038C26C2A7C554F1FFDA3130A2A3F1E1A152"
    },
    {
        "operator_address": "exvaloper1ncdghxtp58y0gq4tem0nex3ln0hxsjefq9x2w4",
        "validator_address": "9F8B5FFEB4DD54D4FF40E4C952AA4F8E0BD426D3"
    },
    {
        "operator_address": "exvaloper1508d7eq592kg2lh9d46xvv3r4sm7gm8w0nrejk",
        "validator_address": "C12BA4719F0F124D44CD1C820F7A7DE5AA2724EF"
    },
    {
        "operator_address": "exvaloper14zgafe7cynlpuhpfpqpxu2gntzhq6ttedqru6j",
        "validator_address": "4CFF323073C5796C57D963F837ACF4A5AC617032"
    },
    {
        "operator_address": "exvaloper14kpvn0zr75594rlrl66lw953mlkrq6qz5ctupj",
        "validator_address": "5F3E052B1788D34A84878B603FDB0DF11DF2BC9E"
    },
    {
        "operator_address": "exvaloper1k84d9rfaz6v92sazaclj24uyvx79wnl8kvckks",
        "validator_address": "8EF0AC196873BB6471F32176B095A459C1277A18"
    },
    {
        "operator_address": "exvaloper1ka92ujcwh6hyyeu4tymzy3dedgxplt4dtsr7xh",
        "validator_address": "D67B9BA8B93D16A80B3F228D9DDCEFBEC0463D10"
    },
    {
        "operator_address": "exvaloper1klcqq056hndfch7yew6fkl6tyrdr07qxv60g90",
        "validator_address": "714BEBEDC3A93CB6EFD71E6E041F41707C77B176"
    },
    {
        "operator_address": "exvaloper1hw0y28hgzadpmjwa68sfukdp69pc68cnxxgml0",
        "validator_address": "154D3DA927BF936369A76C4F5F7672183B842700"
    },
    {
        "operator_address": "exvaloper1h59keaqu7jap3cs6fqw0usggapl9q2x5v4w7rx",
        "validator_address": "EDB8AFEC84C4FCC034143CF86B89C53960FF2706"
    },
    {
        "operator_address": "exvaloper1c34s7lc7ec8gs9xrtxeh0j2wjaam25c3g06xp3",
        "validator_address": "B527086523C2B0B093BECFE42D45729B6775F56D"
    },
    {
        "operator_address": "exvaloper1evazeyntpfr62avj65dwd6mcw9wvh24kc3x84s",
        "validator_address": "621C90FCD8CD2C01A8664FAD003F4CBC400E5DA8"
    },
    {
        "operator_address": "exvaloper1m569cfenudxemegcf4mmykhugnslhdv0xhvcj6",
        "validator_address": "697C3DBA5A7E7326B560E496D6F7B9924A26ED1B"
    },
    {
        "operator_address": "exvaloper1mlmwvdprn8dj6g45vdxkjsjgu4ntu9j7dnjky2",
        "validator_address": "CF60F5722ECD528917287E85BDAC92446B21A08E"
    },
    {
        "operator_address": "exvaloper1ucmx6vvtrwam9pg20fnwmy9z80uhchyxqn67wq",
        "validator_address": "693E03F50442F845AF1EDD43C51F4246F6B3F88B"
    },
    {
        "operator_address": "exvaloper1a9893mfvk9x80x209jhpvl0hm24djxqhr3jwuf",
        "validator_address": "3D3468F41B262F1119C28009DAF0D202881AFADE"
    }
]

Response Parameters

Parameter Type Description
operator_address String
validator_address String

Get relationship of proxy delegator

Query the proxy relationship on a proxy delegator

Rate Limit: 6 requests per second

HTTP Request

GET okexchain/v1/staking/delegators/{address}/proxy

Request Example

https://www.okex.com/okexchain/v1/staking/delegators/ex1pt7xrmxul7sx54ml44lvv403r06clrdk0s8rxy/proxy

Request Parameters

None

Example Response

{
  "delegator_address": "ex10q0rk5qnyag7wfvvt7rtphlw589m7frs3hvqmf",
  "quantity": "1.02400000",
  "completion_time": "2020-05-25T09:44:55.736074648Z"
}

Response Parameters

Parameter Type Description
delegator_address String
quantity String
completion_time String

Get staking pool

Query current staking pool assets

Rate Limit: 6 requests per second

HTTP Request

GET okexchain/v1/staking/pool

Request Example

https://www.okex.win/okexchain/v1/staking/pool

Request Parameters

None

Example Response

{
  "not_bonded_tokens": "46658.862345999999959778",
  "bonded_tokens": "4561558.000338499999741215"
}

Response Parameters

Parameter Type Description
not_bonded_tokens String
bonded_tokens String

Get UnBondingToken of delegator

Query the unbonding token information of the specified delegator

Rate Limit: 6 requests per second

HTTP Request

GET okexchain/v1/staking/delegators/{address}/unbonding_delegations

Request Example

https://www.okex.com/okexchain/v1/staking/delegators/ex17se79kf0c9t5sw0yg0jjdm6et79sy8aradphtg/unbonding_delegations

Request Parameters

None

Example Response

{
  "delegator_address": "ex10q0rk5qnyag7wfvvt7rtphlw589m7frs3hvqmf",
  "quantity": "1.02400000",
  "completion_time": "2020-05-25T09:44:55.736074648Z"
}

Response Parameters

Parameter Type Description
delegator_address String
quantity String
completion_time String

Get validator address

Query corresponding account_address through operator_address

Rate Limit: 6 requests per second

HTTP Request

GET okexchain/v1/v1/staking/address/{operator_addr}/account_address

Request Example

https://www.okex.com/okexchain/v1/staking/address/exvaloper1q9nct2gska2yutx24starv6s63xz022fdwdgzv/account_address

Request Parameters

None

Example Response

"ex1q9nct2gska2yutx24starv6s63xz022fmf8vxk"

Response Parameters

Parameter Type Description
address String

Get validator Info

Query current staking pool assets

Rate Limit: 6 requests per second

HTTP Request

GET okexchain/v1/staking/pool

Request Example

https://www.okex.com/okexchain/v1/staking/pool

Request Parameters

None

Example Response

{
  "not_bonded_tokens": "46658.862345999999959778",
  "bonded_tokens": "4561558.000338499999741215"
}

Response Parameters

Parameter Type Description
not_bonded_tokens String
bonded_tokens String

Get votingInfo of validator

Query all voting information on a validator

Rate Limit: 6 requests per second

HTTP Request

GET okexchain/v1/staking/validators/{address}/shares

Request Example

https://www.okex.com/okexchain/v1/staking/validators/exvaloper1q9nct2gska2yutx24starv6s63xz022fdwdgzv/shares

Request Parameters

None

Example Response

[
  {
    "voter_address": "ex12mek8h0mjs9m4hrh5q4zyhx04pqltyrnrtarud",
    "votes": "1424779953353.73000000"
  },
  {
    "voter_address": "ex12mek8h0mjs9m4hrh5q4zyhx04pqltyrnrtarud",
    "votes": "1424779953353.73000000"
  },
  {
    "voter_address": "ex12mek8h0mjs9m4hrh5q4zyhx04pqltyrnrtarud",
    "votes": "1424779953353.73000000"
  }
]

Response Parameters

Parameter Type Description
voter_address String
votes String

Get validators

Query information on all validators

Rate Limit: 6 requests per second

HTTP Request

GET okexchain/v1/staking/validators?status=all

Request Example

https://www.okex.win/okexchain/v1/staking/validators?status=all

Request Parameters

None

Example Response

[{
    "operator_address": "exvaloper1q9nct2gska2yutx24starv6s63xz022fdwdgzv",
    "consensus_pubkey": "exvalconspub1zcjduepqks93pmhg3aqak0unyx28vgwhnh9vhtapddm75uax4ls2z2frfunsd9mnrx",
    "jailed": false,
    "status": 2,
    "tokens": "0",
    "delegator_shares": "8927161232181.244799749706439149",
    "description": {
        "moniker": "Collector",
        "identity": "",
        "website": "",
        "details": ""
    }
}]

Response Parameters

Parameter Type Description
block_height String
validators Array
> address String
> proposer_priority String
> pub_key String
> voting_power String

Governance

The API endpoints of Governance.

Get govParameters

Get gov parameters by type, deposit / voting / tallying

Rate Limit: 6 requests per second

HTTP Request

GET okexchain/v1/gov/parameters/{ParamsType}

Request Example

https://www.okex.com/okexchain/v1/gov/parameters/deposit

Request Parameters

None

Example Response

{
  "min_deposit": [
    {
      "denom": "okt",
      "amount": "10.000000000000000000"
    }
  ],
  "max_deposit_period": "86400000000000"
}

Response Parameters

Parameter Type Description
min_deposit Array
> amount String
> denom String
max_deposit_period String

Request Example

https://www.okex.com/okexchain/v1/gov/parameters/voting

Request Parameters

None

Example Response

{
  "voting_period": "259200000000000"
}

Response Parameters

Parameter Type Description
voting_period String

Response Parameters

Parameter Type Description
min_deposit Array
> amount String
> denom String
max_deposit_period String

Request Example

https://www.okex.com/okexchain/v1/gov/parameters/tallying

Request Parameters

None

Example Response

{
  "quorum": "0.334000000000000000",
  "threshold": "0.500000000000000000",
  "veto": "0.334000000000000000",
  "yes_in_vote_period": "0.667000000000000000"
}

Response Parameters

Parameter Type Description
quorum String
threshold String
veto String
yes_in_vote_period String

Get proposals

Get the all proposals

Rate Limit: 6 requests per second

HTTP Request

GET okexchain/v1/gov/proposals

Request Example

https://www.okex.com/okexchain/v1/gov/proposals

Request Parameters

None

Example Response

[{
    "content": {
        "type": "okexchain/params/ParameterChangeProposal",
        "value": {
            "ParameterChangeProposal": {
                "title": "open farm",
                "description": "open farm",
                "changes": [{
                    "subspace": "farm",
                    "key": "YieldNativeToken",
                    "value": "true"
                }]
            },
            "height": "600"
        }
    },
    "id": "1",
    "proposal_status": "Passed",
    "final_tally_result": {
        "total_power": "484267077339.546817829366687657",
        "total_voted_power": "352194238067.852231148630318296",
        "yes": "352194238067.852231148630318296",
        "abstain": "0.000000000000000000",
        "no": "0.000000000000000000",
        "no_with_veto": "0.000000000000000000"
    },
    "submit_time": "2021-01-15T12:10:20.683558322Z",
    "deposit_end_time": "2021-01-15T12:10:20.683558322Z",
    "total_deposit": [{
        "denom": "okt",
        "amount": "100.000000000000000000"
    }],
    "voting_start_time": "2021-01-15T12:10:20.683558322Z",
    "voting_end_time": "2021-01-15T13:00:21.369507718Z"
 }]

Response Parameters

Parameter Type Description
content Object
> type String
> value Object
>> ParameterChangeProposal Object
>>> changes Array
>>>> subspace String
>>>> value String
>>>> key String
>>> description String
>>> title String
>> height String
voting_start_time String
id String
deposit_end_time String
submit_time String
total_deposit Array
> amount String
> denom String
final_tally_result Object
> total_voted_power String
> no String
> no_with_veto String
> total_power String
> yes String
> abstain String
proposal_status String
voting_end_time String

Get proposer by proposalId

Get proposer by ID

Rate Limit: 6 requests per second

HTTP Request

GET okexchain/v1/gov/proposals/{ProposalID}/proposer

Request Example

https://www.okex.com/okexchain/v1/gov/proposals/17/proposer

Request Parameters

None

Example Response

{
  "proposal_id": "17",
  "proposer": "ex18au05qx485u2qcw2gvqsrfh29evq77lmnmqk2e"
}

Response Parameters

Parameter Type Description
proposal_id String
proposer String

Get tally by proposalId

Get proposer by ID

Rate Limit: 6 requests per second

HTTP Request

GET okexchain/v1/gov/proposals/{ProposalID}/tally

Request Example

https://www.okex.com/okexchain/v1/gov/proposals/17/tally

Request Parameters

None

Example Response

{
  "total_power": "165837653241301.605382606344753055",
  "total_voted_power": "116130784063951.268597087599105663",
  "yes": "116130784063951.268597087599105663",
  "abstain": "0.000000000000000000",
  "no": "0.000000000000000000",
  "no_with_veto": "0.000000000000000000"
}

Response Parameters

Parameter Type Description
total_power String
total_voted_power String
yes String
abstain String
no String
no_with_veto String

Get votes by proposalId

Get votes by proposalId

Rate Limit: 6 requests per second

HTTP Request

GET okexchain/v1/gov/proposals/{ProposalID}/votes

Request Example

https://www.okex.com/okexchain/v1/gov/proposals/17/votes

Request Parameters

None

Example Response

[
  {
    "proposal_id": "17",
    "voter": "ex18au05qx485u2qcw2gvqsrfh29evq77lmnmqk2e",
    "option": "Yes"
  },
  {
    "proposal_id": "17",
    "voter": "ex1s6nfs7mlj7ewsskkrmekqhpq2w234fczzm23lw",
    "option": "Yes"
  },
  {
    "proposal_id": "17",
    "voter": "ex1zxthrcdcecfe5ss4tal0tq30hzel2lksvx6cnp",
    "option": "Yes"
  },
  {
    "proposal_id": "17",
    "voter": "ex1q9nct2gska2yutx24starv6s63xz022fmf8vxk",
    "option": "Yes"
  },
  {
    "proposal_id": "17",
    "voter": "ex195ez67wmhprwrru34gvttyd8ttpl7edx8xvrc8",
    "option": "Yes"
  },
  {
    "proposal_id": "17",
    "voter": "ex19wln93k3faq7vkqzlc9gljr3ey5fljt984rz57",
    "option": "Yes"
  },
  {
    "proposal_id": "17",
    "voter": "ex1qva0ejf0t943x6rt824gwmvtjgec9cjr2v72ha",
    "option": "Yes"
  },
  {
    "proposal_id": "17",
    "voter": "ex1ka92ujcwh6hyyeu4tymzy3dedgxplt4dahf6zd",
    "option": "Yes"
  },
  {
    "proposal_id": "17",
    "voter": "ex1zza3jrylyecrtuh0p9ts2xauzsefuvwarc0d5u",
    "option": "Yes"
  },
  {
    "proposal_id": "17",
    "voter": "ex1ygcvtcqxl82xvzrq25dymam434k3nnc8qfx8jp",
    "option": "Yes"
  },
  {
    "proposal_id": "17",
    "voter": "ex1ja9xngm4zh0t442mse73ll30p7dczd49xqdhwu",
    "option": "Yes"
  },
  {
    "proposal_id": "17",
    "voter": "ex1c34s7lc7ec8gs9xrtxeh0j2wjaam25c37gsz9t",
    "option": "Yes"
  },
  {
    "proposal_id": "17",
    "voter": "ex1m569cfenudxemegcf4mmykhugnslhdv0ssxukq",
    "option": "Yes"
  }
]

Response Parameters

Parameter Type Description
proposal_id String
voter String
option String

EVM

The Jason RPC of EVM .

eth

eth_gasPrice

Returns array of all eth accounts.

POST Request

POST https://exchaintestrpc.okex.org

Request Example

curl --location --request POST 'https://exchaintestrpc.okex.org/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_accounts",
    "params": [],
    "id": 1
}'

Request Parameters

None

Example Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": ["0x3b7252d007059ffc82d16d022da3cbf9992d2f70", "0xddd64b4712f7c8f1ace3c145c950339eddaf221d", "0x0f54f47bf9b8e317b214ccd6a7c3e38b893cd7f0"]
}

Response Parameters

Parameter Type Description
jsonrpc String
id String
result Array

eth_blockNumber

Returns the current block height.

POST Request

POST https://exchaintestrpc.okex.org

Request Example

curl --location --request POST 'https://exchaintestrpc.okex.org/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_blockNumber",
    "params": [],
    "id": 1
}'

Request Parameters

None

Example Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x66"
}

Response Parameters

Parameter Type Description
jsonrpc String
id String
result String

eth_call

Executes a new message call immediately without creating a transaction on the block chain.

POST Request

POST https://exchaintestrpc.okex.org

Request Example

curl --location --request POST 'https://exchaintestrpc.okex.org/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_call",
    "params": [{
        "from": "0x3b7252d007059ffc82d16d022da3cbf9992d2f70",
        "to": "0xddd64b4712f7c8f1ace3c145c950339eddaf221d",
        "gas": "0x5208",
        "gasPrice": "0x55ae82600",
        "value": "0x16345785d8a0000",
        "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"
    }, "0x0"],
    "id": 1
}'

Request Parameters

Parameter Type Description
from String DATA, 20 Bytes - (optional) The address the transaction is sent from.
to String DATA, 20 Bytes - The address the transaction is directed to.
gas String QUANTITY - gas provided for the transaction execution. eth_call consumes zero gas, but this parameter may be needed by some executions.
gasPrice String QUANTITY - gasPrice used for each paid gas
value String QUANTITY - value sent with this transaction
data String DATA - (optional) Hash of the method signature and encoded parameters. For details see Ethereum Contract ABI in the Solidity documentation
Block number String

Example Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x"
}

Response Parameters

Parameter Type Description
jsonrpc String
id String
result String

eth_estimateGas

Returns an estimate value of the gas required to send the transaction.

POST Request

POST https://exchaintestrpc.okex.org

Request Example

curl --location --request POST 'https://exchaintestrpc.okex.org/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_estimateGas",
    "params": [{
        "from": "0x0f54f47bf9b8e317b214ccd6a7c3e38b893cd7f0",
        "to": "0x3b7252d007059ffc82d16d022da3cbf9992d2f70",
        "value": "0x16345785d8a00000"
    }],
    "id": 1
}'

Request Parameters

Parameter Type Description
from String DATA, 20 Bytes - The address the transaction is send from.
to String DATA, 20 Bytes - (optional when creating new contract) The address the transaction is directed to.
value String QUANTITY - value sent with this transaction

Example Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x1199b"
}

Response Parameters

Parameter Type Description
jsonrpc String
id String
result String

eth_gasPrice

Returns the current gas price in aphotons.

POST Request

POST https://exchaintestrpc.okex.org

Request Example

curl --location --request POST 'https://exchaintestrpc.okex.org/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_gasPrice",
    "params": [],
    "id": 1
}'

Request Parameters

None

Example Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x0"
}

Response Parameters

Parameter Type Description
jsonrpc String
id String
result String

eth_getBalance

Returns the account balance for a given account address and Block Number.

POST Request

POST https://exchaintestrpc.okex.org

Request Example

curl --location --request POST 'https://exchaintestrpc.okex.org/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_getBalance",
    "params": ["0x0f54f47bf9b8e317b214ccd6a7c3e38b893cd7f0", "0x0"],
    "id": 1
}'

Request Parameters

Parameter Type Description
Account Address String
Block Number String

Example Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x36354d5575577c8000"
}

Response Parameters

Parameter Type Description
jsonrpc String
id String
result String

eth_getBlockByHash

Returns the block info given the hash found in the command above and a bool.

POST Request

POST https://exchaintestrpc.okex.org

Request Example

curl --location --request POST 'https://exchaintestrpc.okex.org/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_getBlockByHash",
    "params": ["0x1b9911f57c13e5160d567ea6cf5b545413f96b95e43ec6e02787043351fb2cc4", false],
    "id": 1
}'

Request Parameters

Parameter Type Description
Hash of a block. String
If true it returns the full transaction objects, if false only the hashes of the transactions. String

Example Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "difficulty": null,
        "extraData": "0x0",
        "gasLimit": "0xffffffff",
        "gasUsed": null,
        "hash": "0x1b9911f57c13e5160d567ea6cf5b545413f96b95e43ec6e02787043351fb2cc4",
        "logsBloom": "0x00000000100000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000002000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000",
        "miner": "0x0000000000000000000000000000000000000000",
        "nonce": null,
        "number": "0xc",
        "parentHash": "0x404e58f31a9ede1b614b98701d6b0fbf1450f186842dbcf6426dd16811a5ca0d",
        "sha3Uncles": null,
        "size": "0x307",
        "stateRoot": "0x599ccdb111fc62c6398dc39be957df8e97bf8ab72ce6c06ff10641a92b754627",
        "timestamp": "0x5f5fdbbd",
        "totalDifficulty": null,
        "transactions": ["0xae64961cb206a9773a6e5efeb337773a6fd0a2085ce480a174135a029afea615"],
        "transactionsRoot": "0x4764dba431128836fa919b83d314ba9cc000e75f38e1c31a60484409acea777b",
        "uncles": []
    }
}

Response Parameters

Parameter Type Description
jsonrpc String
id String
result Object
> logsBloom String
> totalDifficulty String
> extraData String
> transactions Array
> nonce String
> miner String
> difficulty String
> gasLimit String
> number String
> gasUsed String
> uncles Array
> sha3Uncles String
> size String
> transactionsRoot String
> stateRoot String
> parentHash String
> hash String
> timestamp String

eth_getBlockByNumber

Returns information about a block by block number.

POST Request

POST https://exchaintestrpc.okex.org

Request Example

curl --location --request POST 'https://exchaintestrpc.okex.org/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_getBlockByNumber",
    "params": ["0x1", false],
    "id": 1
}'

Request Parameters

Parameter Type Description
Block Number String
If true it returns the full transaction objects, if false only the hashes of the transactions. Boolean

Example Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "difficulty": null,
        "extraData": "0x0",
        "gasLimit": "0xffffffff",
        "gasUsed": null,
        "hash": "0xabac6416f737a0eb54f47495b60246d405d138a6a64946458cf6cbeae0d48465",
        "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
        "miner": "0x0000000000000000000000000000000000000000",
        "nonce": null,
        "number": "0x1",
        "parentHash": "0x",
        "sha3Uncles": null,
        "size": "0x9b",
        "stateRoot": "0x",
        "timestamp": "0x5f5bd3e5",
        "totalDifficulty": null,
        "transactions": [],
        "transactionsRoot": "0x",
        "uncles": []
    }
}

Response Parameters

Parameter Type Description
jsonrpc String
id String
result Object
> logsBloom String
> totalDifficulty String
> extraData String
> transactions Array
> nonce String
> miner String
> difficulty String
> gasLimit String
> number String
> gasUsed String
> uncles Array
> sha3Uncles String
> size String
> transactionsRoot String
> stateRoot String
> parentHash String
> hash String
> timestamp String

eth_getBlockTransactionCountByHash

Returns the total transaction count for a given block hash.

POST Request

POST https://exchaintestrpc.okex.org

Request Example

curl --location --request POST 'https://exchaintestrpc.okex.org/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_getBlockTransactionCountByNumber",
    "params": ["0x8101cc04aea3341a6d4b3ced715e3f38de1e72867d6c0db5f5247d1a42fbb085"],
    "id": 1
}'

Request Parameters

Parameter Type Description
Block Hash String

Example Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x3"
}

Response Parameters

Parameter Type Description
jsonrpc String
id String
result String

eth_getBlockTransactionCountByNumber¶

Returns the total transaction count for a given block number.

POST Request

POST https://exchaintestrpc.okex.org

Request Example

curl --location --request POST 'https://exchaintestrpc.okex.org/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_getBlockTransactionCountByNumber",
    "params": ["0x1"],
    "id": 1
}'

Request Parameters

Parameter Type Description
Block Number String

Example Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "difficulty": null,
        "extraData": "0x0",
        "gasLimit": "0xffffffff",
        "gasUsed": "0x0",
        "hash": "0x8101cc04aea3341a6d4b3ced715e3f38de1e72867d6c0db5f5247d1a42fbb085",
        "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
        "miner": "0x0000000000000000000000000000000000000000",
        "nonce": null,
        "number": "0x17d",
        "parentHash": "0x70445488069d2584fea7d18c829e179322e2b2185b25430850deced481ca2e77",
        "sha3Uncles": null,
        "size": "0x1df",
        "stateRoot": "0x269bb17fe7adb8dd5f15f57b717979f82078d6b7a675c1ba1b0da2d27e415fcc",
        "timestamp": "0x5f5ba97c",
        "totalDifficulty": null,
        "transactions": [],
        "transactionsRoot": "0x",
        "uncles": []
    }
}

Response Parameters

Parameter Type Description
jsonrpc String
id String
result Object
> logsBloom String
> totalDifficulty String
> extraData String
> transactions Array
> nonce String
> miner String
> difficulty String
> gasLimit String
> number String
> gasUsed String
> uncles Array
> sha3Uncles String
> size String
> transactionsRoot String
> stateRoot String
> parentHash String
> hash String
> timestamp String

eth_getCode

Returns the code for a given account address and Block Number.

POST Request

POST https://exchaintestrpc.okex.org

Request Example

curl --location --request POST 'https://exchaintestrpc.okex.org/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_getBlockTransactionCountByNumber",
    "params": ["0x8101cc04aea3341a6d4b3ced715e3f38de1e72867d6c0db5f5247d1a42fbb085", "0x0"],
    "id": 1
}'

Request Parameters

Parameter Type Description
Account Address String
Block Number String

Example Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0xef616c92f3cfc9e92dc270d6acff9cea213cecc7020a76ee4395af09bdceb4837a1ebdb5735e11e7d3adb6104e0c3ac55180b4ddf5e54d022cc5e8837f6a4f971b"
}

Response Parameters

Parameter Type Description
jsonrpc String
id String
result String

eth_getFilterChanges

Polling method for a filter, which returns an array of logs which occurred since last poll.

POST Request

POST https://exchaintestrpc.okex.org

Request Example

curl --location --request POST 'https://exchaintestrpc.okex.org/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_getFilterChanges",
    "params": ["0x127e9eca4f7751fb4e5cb5291ad8b455"],
    "id": 1
}'

Request Parameters

Parameter Type Description
The filter id String

Example Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": ["0xc6f08d183a81e149896fc5317c872f9092068e88e956ca1864e9bd4c81c09b44", "0x3ca6dfb5be15549d721d1b3d10c1bec50ed6217c9ac7b61df361fac9692a27e5", "0x776fffac134171acb1ebf2e59856625501ad5ccc5c4c8fe0359e0d4dff8919f2", "0x84123103704dbd738c089276ab2b04b5936330b24f6e78453c4ba8bf4848aaf9", "0xffddbe5bd8e8aa41e44002daa9ea89ade9e6980a0d83f51d104cf16498827eca", "0x53430e49963e8ae32605d8f22dec2e757a691e6436d593854ca4d9383eeab86a", "0x975948058c9351a91fbec332ca00dda39d1a919f5f16b996a4c7e30c38ba423b", "0x619e37e32024c8efef7f7220e6caff4ee1d682ea78b2ac91e0a6b30850dc0677", "0x31a5d985a40d08303ac68000ce008df512bcd1a911c497415c97f0624b4a271a", "0x91dcf1fce4503a8dbb3e6fb61073f25cd31d69c766ecba639fefde4436e59d07", "0x606d9e0143cfdb410a6812c590a8135b5c6b5c59eec26d760d5cd930aa47257d", "0xd3c00b859b29b20ba654415eef648ef58251389c73a138580db87675b0d5465f", "0x954391f0eb50888be90489898016ebb54f750f612f3adec2a00854955d5e52d8", "0x698905f06aff921a9e9fcef39b8b0d107747c3e6204d2ea79cf4c12debf8d253", "0x9fcafec5721938a06eb8e2951ede4b6ef8fae54a8c8f85f3166ec9782a0032b5", "0xaec6d3364e47a5716ba69e4705f3c705d017f81298859589591183bfea87be7a", "0x91bf2ee13319b6eaca96ed89c126437b66c4df1b13560c6a9bb18556ee3b7e1f", "0x4f426dc1fc0ea8149052033065b237892d2d34927b2d558ab50c5a7fb98d6e79", "0xdd809fb07e5aab638fef5311371b4e2b27c9c9a6183fde0cdd2b7724f6d2a89b", "0x7e12fc92ab953e233a304959a2a8474d96195e71efd9388fdceb1326a577811a", "0x30618ef6b490c3cc9979c47163459db37c1a1e0aa5793c56accd417f9d89973b", "0x614609f06ee24bae7408e45895b1a25e6b19a8159aeea7a95c9d1339d9ba286f", "0x115ddc6d533620040791d241f01f1c5ae3d9d1a8f64b15af5e9793e4d9096e22", "0xb7458c9323beeca2cd54f32a6af5671f3cd5a7a251aed9d82bdd6ebe5f56305b", "0x573dd48a5ba7bf4cc3d49597cd7419f75ecc9897258f1ebadebd670446d0d358", "0xcb6670918439f9698413b53f3b5336d82ca4be152fdefaacf45e052fff6262fc", "0xf3fe2a8945abafd269ab97bfdc80b3dbff2202ffdce59a227f952874b966b230", "0x989980707007533cc0840a079f77f261a2e818abae1a1ffd3af02f3fff1d35fd", "0x886b6ae365fec996be8a9a2c31cf4cda97ff8352908be2c83f17abd66ef1591e", "0xfd90df68706ef95a62b317de93d6899a9bd6c80416e42d007f5c30fcdedfce24", "0x7af8491fbb0373886d9032bb74e0ef52ed9e100f260b79bd15f46126b38cbede", "0x91d1e2cd55533cf7dd5de86c9aa73295e811b1279be193d429bbd6ba83810e16", "0x6b65b3128c2104005a04923288fe2aa33a2477a4962bef70532f94cab582f2a7"]
}

Response Parameters

Parameter Type Description
jsonrpc String
id String
result Array

eth_getFilterChanges

Returns an array of all logs matching a given filter object.

POST Request

POST https://exchaintestrpc.okex.org

Request Example

curl --location --request POST 'https://exchaintestrpc.okex.org/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"topics":["0x775a94827b8fd9b519d36cd827093c664f93347070a554f65e4a6f56cd738898","0x0000000000000000000000000000000000000000000000000000000000000011"],"fromBlock":"latest"}],"id":1}'

Request Parameters

Parameter Type Description
fromBlock String QUANTITY TAG - (optional, default: “latest”) Integer block number, or “latest” for the last mined block or “pending”, “earliest” for not yet mined transactions.
toBlock String QUANTITY TAG - (optional, default: “latest”) Integer block number, or “latest” for the last mined block or “pending”, “earliest” for not yet mined transactions.
address String DATA Array, 20 Bytes - (optional) Contract address or a list of addresses from which logs should originate.
topics Array Array of DATA, - (optional) Array of 32 Bytes DATA topics. Topics are order-dependent. Each topic can also be an array of DATA with “or” options.
blockhash String (optional, future) With the addition of EIP-234, blockHash will be a new filter option which restricts the logs returned to the single block with the 32-byte hash blockHash. Using blockHash is equivalent to fromBlock = toBlock = the block number with hash blockHash. If blockHash is present in in the filter criteria, then neither fromBlock nor toBlock are allowed.

Example Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": []
}

Response Parameters

Parameter Type Description
jsonrpc String
id String
result Array

eth_getStorageAt

Returns the storage address for a given account address.

POST Request

POST https://exchaintestrpc.okex.org

Request Example

curl --location --request POST 'https://exchaintestrpc.okex.org/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_getStorageAt",
    "params": ["0x0f54f47bf9b8e317b214ccd6a7c3e38b893cd7f0", "0", "latest"],
    "id": 1
}'

Request Parameters

Parameter Type Description
Account Address String
Integer of the position in the storage String
Block Number String

Example Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x0000000000000000000000000000000000000000000000000000000000000000"
}

Response Parameters

Parameter Type Description
jsonrpc String
id String
result String

eth_getTransactionByBlockHashAndIndex

Returns transaction details given the block hash and the transaction index.

POST Request

POST https://exchaintestrpc.okex.org

Request Example

curl --location --request POST 'https://exchaintestrpc.okex.org/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_getTransactionByBlockHashAndIndex",
    "params": ["0x1b9911f57c13e5160d567ea6cf5b545413f96b95e43ec6e02787043351fb2cc4", "0x0"],
    "id": 1
}'

Request Parameters

Parameter Type Description
Hash of a block. String
Transaction index position. String

Example Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "blockHash": "0x1b9911f57c13e5160d567ea6cf5b545413f96b95e43ec6e02787043351fb2cc4",
        "blockNumber": "0xc",
        "from": "0xddd64b4712f7c8f1ace3c145c950339eddaf221d",
        "gas": "0x4c4b40",
        "gasPrice": "0x3b9aca00",
        "hash": "0xae64961cb206a9773a6e5efeb337773a6fd0a2085ce480a174135a029afea615",
        "input": "0x4f2be91f",
        "nonce": "0x0",
        "to": "0x439c697e0742a0ddb124a376efd62a72a94ac35a",
        "transactionIndex": "0x0",
        "value": "0x0",
        "v": "0xa96",
        "r": "0xced57d973e58b0f634f776d57daf41d3d3387ceb347a3a72ca0746e5ec2b709e",
        "s": "0x384e89e209a5eb147a2bac3a4e399507400ac7b29cd155531f9d6203a89db3f2"
    }
}

Response Parameters

Parameter Type Description
jsonrpc String
id String
result Object
> blockHash String
> transactionIndex String
> nonce String
> input String
> r String
> s String
> v String
> blockNumber String
> gas String
> from String
> to String
> value String
> hash String
> gasPrice String

eth_getBlockByHash

Returns transaction details given the ethereum tx something.

POST Request

POST https://exchaintestrpc.okex.org

Request Example

curl --location --request POST 'https://exchaintestrpc.okex.org/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_getTransactionByHash",
    "params": ["0xec5fa15e1368d6ac314f9f64118c5794f076f63c02e66f97ea5fe1de761a8973"],
    "id": 1
}'

Request Parameters

Parameter Type Description
hash of a transaction String

Example Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "blockHash": "0x7a7398cc11d9c4c8e6f53e0c73824297aceafdab62db9e4b867a0da694384864",
        "blockNumber": "0x188",
        "from": "0x3b7252d007059ffc82d16d022da3cbf9992d2f70",
        "gas": "0x147ee",
        "gasPrice": "0x3b9aca00",
        "hash": "0xec5fa15e1368d6ac314f9f64118c5794f076f63c02e66f97ea5fe1de761a8973",
        "input": "0x6dba746c",
        "nonce": "0x18",
        "to": "0xa655256f589060437e5ffe2246dec385d040f148",
        "transactionIndex": "0x0",
        "value": "0x0",
        "v": "0xa96",
        "r": "0x6db399d694a452fb4106419140a6e5dbbe6817743a0f6f695a651e6576e59a5e",
        "s": "0x25dd6ab1f936d0280d2fed0caeb0ebe5b9a46de6d8cb08ad8fd2c88deb55fc31"
    }
}

Response Parameters

Parameter Type Description
jsonrpc String
id String
result Object
> blockHash String
> transactionIndex String
> nonce String
> input String
> r String
> s String
> v String
> blockNumber String
> gas String
> from String
> to String
> value String
> hash String
> gasPrice String

eth_getTransactionCount

Returns the total transaction for a given account address and Block Number.

POST Request

POST https://exchaintestrpc.okex.org

Request Example

curl --location --request POST 'https://exchaintestrpc.okex.org/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_getTransactionCount",
    "params": ["0x7bf7b17da59880d9bcca24915679668db75f9397", "0x0"],
    "id": 1
}'

Request Parameters

Parameter Type Description
Account Address String
Block Number String

Example Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x8"
}

Response Parameters

Parameter Type Description
jsonrpc String
id String
result String

eth_getTransactionByBlockHashAndIndex

Returns the receipt of a transaction by transaction hash.

POST Request

POST https://exchaintestrpc.okex.org

Request Example

curl --location --request POST 'https://exchaintestrpc.okex.org/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_getTransactionReceipt",
    "params": ["0xae64961cb206a9773a6e5efeb337773a6fd0a2085ce480a174135a029afea614"],
    "id": 1
}'

Request Parameters

Parameter Type Description
Hash of a transaction String

Example Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "blockHash": "0x1b9911f57c13e5160d567ea6cf5b545413f96b95e43ec6e02787043351fb2cc4",
        "blockNumber": "0xc",
        "contractAddress": "0x0000000000000000000000000000000000000000",
        "cumulativeGasUsed": null,
        "from": "0xddd64b4712f7c8f1ace3c145c950339eddaf221d",
        "gasUsed": "0x5289",
        "logs": [{
            "address": "0x439c697e0742a0ddb124a376efd62a72a94ac35a",
            "topics": ["0x64a55044d1f2eddebe1b90e8e2853e8e96931cefadbfa0b2ceb34bee36061941"],
            "data": "0x0000000000000000000000000000000000000000000000000000000000000002",
            "blockNumber": "0xc",
            "transactionHash": "0xae64961cb206a9773a6e5efeb337773a6fd0a2085ce480a174135a029afea615",
            "transactionIndex": "0x0",
            "blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
            "logIndex": "0x0",
            "removed": false
        }, {
            "address": "0x439c697e0742a0ddb124a376efd62a72a94ac35a",
            "topics": ["0x938d2ee5be9cfb0f7270ee2eff90507e94b37625d9d2b3a61c97d30a4560b829"],
            "data": "0x0000000000000000000000000000000000000000000000000000000000000002",
            "blockNumber": "0xc",
            "transactionHash": "0xae64961cb206a9773a6e5efeb337773a6fd0a2085ce480a174135a029afea615",
            "transactionIndex": "0x0",
            "blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
            "logIndex": "0x1",
            "removed": false
        }],
        "logsBloom": "0x00000000100000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000002000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000",
        "status": "0x1",
        "to": "0x439c697e0742a0ddb124a376efd62a72a94ac35a",
        "transactionHash": "0xae64961cb206a9773a6e5efeb337773a6fd0a2085ce480a174135a029afea615",
        "transactionIndex": "0x0"
    }
}

Response Parameters

Parameter Type Description
jsonrpc String
id String
result Object
> blockHash String
> logsBloom String
> gasUsed String
> blockNumber String
> contractAddress String
> cumulativeGasUsed String
> from String
> transactionIndex String
> to String
> logs Array
>> blockHash String
>> address String
>> logIndex String
>> data String
>> removed String
>> topics Array
>> blockNumber String
>> transactionIndex String
>> transactionHash String
> transactionHash String
> status String

eth_getTransactionByBlockHashAndIndex

Creates a filter in the node, to notify when a new block arrives.

POST Request

POST https://exchaintestrpc.okex.org

Request Example

curl --location --request POST 'https://exchaintestrpc.okex.org/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_newBlockFilter",
    "params": [],
    "id": 1
}'

Request Parameters

Parameter Type Description
Hash of a transaction String

Example Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0xdc714a4a2e3c39dc0b0b84d66a3ccb00"
}

Response Parameters

Parameter Type Description
jsonrpc String
id String
result String

eth_getTransactionByBlockHashAndIndex

Create new filter using topics of some kind.

POST Request

POST https://exchaintestrpc.okex.org

Request Example

curl --location --request POST 'https://exchaintestrpc.okex.org/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_newFilter",
    "params": [{
        "topics": ["0x0000000000000000000000000000000000000000000000000000000012341234"]
    }],
    "id": 1
}'

Request Parameters

Parameter Type Description
Hash of a transaction String

Example Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0xdc714a4a2e3c39dc0b0b84d66a3ccb00"
}

Response Parameters

Parameter Type Description
jsonrpc String
id String
result String

eth_newPendingTransactionFilter

Creates a filter in the node, to notify when new pending transactions arrive.

POST Request

POST https://exchaintestrpc.okex.org

Request Example

curl --location --request POST 'https://exchaintestrpc.okex.org/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_newPendingTransactionFilter",
    "params": [],
    "id": 1
}'

Request Parameters

Parameter Type Description
Hash of a transaction String

Example Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x9daacfb5893d946997d3801ea18e9902"
}

Response Parameters

Parameter Type Description
jsonrpc String
id String
result String

eth_protocolVersion

Returns the current ethereum protocol version.

POST Request

POST https://exchaintestrpc.okex.org

Request Example

curl --location --request POST 'https://exchaintestrpc.okex.org/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_protocolVersion",
    "params": [],
    "id": 1
}'

Request Parameters

None

Example Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x3f"
}

Response Parameters

Parameter Type Description
jsonrpc String
id String
result String

eth_sendRawTransaction

Creates new message call transaction or a contract creation for signed transactions. You can get signed transaction data using the personal_sign method

POST Request

POST https://exchaintestrpc.okex.org

Request Example

curl --location --request POST 'https://exchaintestrpc.okex.org/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_sendRawTransaction",
    "params": ["0xf9ff74c86aefeb5f6019d77280bbb44fb695b4d45cfe97e6eed7acd62905f4a85034d5c68ed25a2e7a8eeb9baf1b8401e4f865d92ec48c1763bf649e354d900b1c"],
    "id": 1
}'

Request Parameters

Parameter Type Description
The signed transaction data String

Example Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x0000000000000000000000000000000000000000000000000000000000000000"
}

Response Parameters

Parameter Type Description
jsonrpc String
id String
result String

eth_sendTransaction

Sends transaction from given account to a given account.

POST Request

POST https://exchaintestrpc.okex.org

Request Example

curl --location --request POST 'https://exchaintestrpc.okex.org/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_sendTransaction",
    "params": [{
        "from": "0x3b7252d007059ffc82d16d022da3cbf9992d2f70",
        "to": "0x0f54f47bf9b8e317b214ccd6a7c3e38b893cd7f0",
        "value": "0x16345785d8a0000",
        "gasLimit": "0x5208",
        "gasPrice": "0x55ae82600"
    }],
    "id": 1
}'

Request Parameters

Parameter Type Description
from String DATA, 20 Bytes - The address the transaction is send from.
to String DATA, 20 Bytes - (optional when creating new contract) The address the transaction is directed to.
gas String QUANTITY - (optional, default: 90000) Integer of the gas provided for the transaction execution. It will return unused gas.
gasPrice String QUANTITY - (optional, default: To-Be-Determined) Integer of the gasPrice used for each paid gas
value String QUANTITY - value sent with this transaction
data String DATA - The compiled code of a contract OR the hash of the invoked method signature and encoded parameters. For details see Ethereum Contract ABI
nonce String QUANTITY - (optional) Integer of a nonce. This allows to overwrite your own pending transactions that use the same nonce.

Example Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x33653249db68ebe5c7ae36d93c9b2abc10745c80a72f591e296f598e2d4709f6"
}

Response Parameters

Parameter Type Description
jsonrpc String
id String
result String

eth_sign

The sign method calculates an Ethereum specific signature with: sign(keccak256(”\x19Ethereum Signed Message:\n” + len(message) + message))).

By adding a prefix to the message makes the calculated signature recognisable as an Ethereum specific signature. This prevents misuse where a malicious DApp can sign arbitrary data (e.g. transaction) and use the signature to impersonate the victim.

warning the address to sign with must be unlocked.

POST Request

POST https://exchaintestrpc.okex.org

Request Example

curl --location --request POST 'https://exchaintestrpc.okex.org/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_sign",
    "params": ["0x3b7252d007059ffc82d16d022da3cbf9992d2f70", "0xdeadbeaf"],
    "id": 1
}'

Request Parameters

Parameter Type Description
Account Address String
Message to sign String

Example Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x909809c76ed2a5d38733de39207d0f411222b9b49c64a192bf649cb13f63f37b45acb4f6939facb4f1c277bc70fb00407564140c0f18600ac44388f2c1dfd1dc1b"
}

Response Parameters

Parameter Type Description
jsonrpc String
id String
result String

eth_syncing

The sync status object may need to be different depending on the details of Tendermint’s sync protocol. However, the ‘synced’ result is simply a boolean, and can easily be derived from Tendermint’s internal sync state.

POST Request

POST https://exchaintestrpc.okex.org

Request Example

curl --location --request POST 'https://exchaintestrpc.okex.org/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_syncing",
    "params": [],
    "id": 1
}'

Request Parameters

None

Example Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": false
}

Response Parameters

Parameter Type Description
jsonrpc String
id String
result Boolean

eth_uninstallFilter¶

Removes the filter with the given filter id. Returns true if the filter was successfully uninstalled, otherwise false.

POST Request

POST https://exchaintestrpc.okex.org

Request Example

curl --location --request POST 'https://exchaintestrpc.okex.org/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_uninstallFilter",
    "params": ["0xb91b6608b61bf56288a661a1bd5eb34a"],
    "id": 1
}'

Request Parameters

Parameter Type Description
Hash of a transaction String

Example Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": true
}

Response Parameters

Parameter Type Description
jsonrpc String
id String
result Boolean

net

web3_sha3

Returns the current network id.

POST Request

POST https://exchaintestrpc.okex.org

Request Example

curl --location --request POST 'https://exchaintestrpc.okex.org/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "net_version",
    "params": [],
    "id": 1
}'

Request Parameters

Parameter Type Description
params Array

Example Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "8"
}

Response Parameters

Parameter Type Description
jsonrpc String
id String
result String

web3

web3_clientVersion

Get the web3 client version.

POST Request

POST https://exchaintestrpc.okex.org

Request Example

curl --location --request POST 'https://exchaintestrpc.okex.org/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "web3_clientVersion",
    "params": [],
    "id": 67
}'

Request Parameters

None

Example Response

{
    "jsonrpc": "2.0",
    "id": 67,
    "result": "exchain-v0.18.4"
}

Response Parameters

Parameter Type Description
jsonrpc String
id String
result String

web3_sha3

Returns Keccak-256 (not the standardized SHA3-256) of the given data.

POST Request

POST https://exchaintestrpc.okex.org

Request Example

curl --location --request POST 'https://exchaintestrpc.okex.org/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "web3_sha3",
    "params": ["0x67656c6c6f20776f726c64"],
    "id": 1
}'

Request Parameters

Parameter Type Description
params String

Example Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x1b84adea42d5b7d192fd8a61a85b25abe0757e9a65cab1da470258914053823f"
}

Response Parameters

Parameter Type Description
jsonrpc String
id String
result String

personal

personal_sign

ecRecover returns the address associated with the private key that was used to calculate the signature in personal_sign.

POST Request

POST https://exchaintestrpc.okex.org

Request Example

curl -X POST --data '{"jsonrpc":"2.0","method":"personal_ecRecover","params":["0xdeadbeaf", "0xf9ff74c86aefeb5f6019d77280bbb44fb695b4d45cfe97e6eed7acd62905f4a85034d5c68ed25a2e7a8eeb9baf1b8401e4f865d92ec48c1763bf649e354d900b1c"],"id":1}' -H "Content-Type: application/json" https://exchaintestrpc.okex.org

Request Parameters

Parameter Type Description
Message String
Signature returned from personal_sign String

Example Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x3b7252d007059ffc82d16d022da3cbf9992d2f70"
}

Response Parameters

Parameter Type Description
jsonrpc String
id String
result String

personal_importRawKey

Imports the given unencrypted private key (hex string) into the key store, encrypting it with the passphrase.

Returns the address of the new account.

:::warning Currently, this is not implemented since the feature is not supported by the keys :::

POST Request

POST https://exchaintestrpc.okex.org

Request Example

curl -X POST --data '{"jsonrpc":"2.0","method":"personal_importRawKey","params":["c5bd76cd0cd948de17a31261567d219576e992d9066fe1a6bca97496dec634e2c8e06f8949773b300b9f73fabbbc7710d5d6691e96bcf3c9145e15daf6fe07b9", "the key is this"],"id":1}' -H "Content-Type: application/json" https://exchaintestrpc.okex.org/

Request Parameters

Parameter Type Description
Hex encoded ECDSA key String
Passphrase String

Example Response

{
    "jsonrpc": "2.0",
    "result": "",
    "id": 1
}

Response Parameters

Parameter Type Description
jsonrpc String
id String
result String

personal_listAccounts

Returns a list of addresses for accounts this node manages.

POST Request

POST https://exchaintestrpc.okex.org

Request Example

curl -X POST --data '{"jsonrpc":"2.0","method":"personal_listAccounts","params":[],"id":1}' -H "Content-Type: application/json" https://exchaintestrpc.okex.org

Request Parameters

None

Example Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": ["0x3b7252d007059ffc82d16d022da3cbf9992d2f70", "0xddd64b4712f7c8f1ace3c145c950339eddaf221d", "0x0f54f47bf9b8e317b214ccd6a7c3e38b893cd7f0"]
}

Response Parameters

Parameter Type Description
jsonrpc String
id String
result Array

personal_lockAccount

Removes the private key with given address from memory. The account can no longer be used to send transactions.

POST Request

POST https://exchaintestrpc.okex.org

Request Example

curl -X POST --data '{"jsonrpc":"2.0","method":"personal_lockAccount","params":["0x0f54f47bf9b8e317b214ccd6a7c3e38b893cd7f0"],"id":1}' -H "Content-Type: application/json" https://exchaintestrpc.okex.org

Request Parameters

Parameter Type Description
Account Address String

Example Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": true]
}

Response Parameters

Parameter Type Description
jsonrpc String
id String
result Boolean

personal_lockAccount

Generates a new private key and stores it in the key store directory. The key file is encrypted with the given passphrase. Returns the address of the new account.

POST Request

POST https://exchaintestrpc.okex.org

Request Example

curl -X POST --data '{"jsonrpc":"2.0","method":"personal_newAccount","params":["This is the passphrase"],"id":1}' -H "Content-Type: application/json" https://exchaintestrpc.okex.org

Request Parameters

Parameter Type Description
Passphrase String

Example Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0xf0e4086ad1c6aab5d42161d5baaae2f9ad0571c0"
}

Response Parameters

Parameter Type Description
jsonrpc String
id String
result String

personal_unlockAccount

Validate the given passphrase and submit transaction.

The transaction is the same argument as for eth_sendTransaction and contains the from address. If the passphrase can be used to decrypt the private key belogging to tx.from the transaction is verified, signed and send onto the network.

:::warning The account is not unlocked globally in the node and cannot be used in other RPC calls. :::

POST Request

POST https://exchaintestrpc.okex.org

Request Example

curl -X POST --data '{"jsonrpc":"2.0","method":"personal_sendTransaction","params":[{"from":"0x3b7252d007059ffc82d16d022da3cbf9992d2f70","to":"0xddd64b4712f7c8f1ace3c145c950339eddaf221d", "value":"0x16345785d8a0000"}, "passphrase"],"id":1}' -H "Content-Type: application/json" https://exchaintestrpc.okex.org

Request Parameters

Parameter Type Description
from String DATA, 20 Bytes - The address the transaction is send from.
to String DATA, 20 Bytes - (optional when creating new contract) The address the transaction is directed to
value String QUANTITY - value sent with this transaction
Passphrase String

Example Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0xd2a31ec1b89615c8d1f4d08fe4e4182efa4a9c0d5758ace6676f485ea60e154c"
}

Response Parameters

Parameter Type Description
jsonrpc String
id String
result String

personal_sign

The sign method calculates an Ethereum specific signature with: sign(keccack256(”\x19Ethereum Signed Message:\n” + len(message) + message))).

POST Request

POST https://exchaintestrpc.okex.org

Request Example

curl -X POST --data '{"jsonrpc":"2.0","method":"personal_sign","params":["0xdeadbeaf", "0x3b7252d007059ffc82d16d022da3cbf9992d2f70", "password"],"id":1}' -H "Content-Type: application/json" https://exchaintestrpc.okex.org

Request Parameters

Parameter Type Description
Message String
Account Address String
Password String

Example Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0xf9ff74c86aefeb5f6019d77280bbb44fb695b4d45cfe97e6eed7acd62905f4a85034d5c68ed25a2e7a8eeb9baf1b8401e4f865d92ec48c1763bf649e354d900b1c"
}

Response Parameters

Parameter Type Description
jsonrpc String
id String
result String

personal_unlockAccount

Decrypts the key with the given address from the key store.

Both passphrase and unlock duration are optional when using the JavaScript console. The unencrypted key will be held in memory until the unlock duration expires. If the unlock duration defaults to 300 seconds. An explicit duration of zero seconds unlocks the key until geth exits.

The account can be used with eth_sign and eth_sendTransaction while it is unlocked.

POST Request

POST https://exchaintestrpc.okex.org

Request Example

curl -X POST --data '{"jsonrpc":"2.0","method":"personal_unlockAccount","params":["0x0f54f47bf9b8e317b214ccd6a7c3e38b893cd7f0", "secret passphrase", 30],"id":1}' -H "Content-Type: application/json" https://exchaintestrpc.okex.org

Request Parameters

Parameter Type Description
Account Address String
Passphrase String
Duration String

Example Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": true
}

Response Parameters

Parameter Type Description
jsonrpc String
id String
result Boolean

webSocket

eth_subscribe

subscribe using JSON-RPC notifications. This allows clients to wait for events instead of polling for them.

It works by subscribing to particular events. The node will return a subscription id. For each event that matches the subscription a notification with relevant data is send together with the subscription id.

POST Request

POST https://exchaintestrpc.okex.org

Request Example

curl --location --request POST 'https://exchaintestrpc.okex.org/' \
--header 'Content-Type: application/json' \
--data-raw '{"id": 1, "method": "eth_subscribe", "params": ["newHeads", {"includeTransactions": true}]}'

Request Parameters

Parameter Type Description
Subscription Name String
Optional Arguments String

Example Response

{
    "jsonrpc": "2.0",
    "result": "0x34da6f29e3e953af4d0c7c58658fd525",
    "id": 1
}

Response Parameters

Parameter Type Description
jsonrpc String
id String
result String

eth_subscribe

Unsubscribe from an event using the subscription id

POST Request

POST https://exchaintestrpc.okex.org

Request Example

curl --location --request POST 'https://exchaintestrpc.okex.org/' \
--header 'Content-Type: application/json' \
--data-raw '{"id": 1, "method": "eth_unsubscribe", "params": ["0x34da6f29e3e953af4d0c7c58658fd525"]}'

Request Parameters

Parameter Type Description
Subscription ID String

Example Response

{
    "jsonrpc": "2.0",
    "result": true,
    "id": 1
}

Response Parameters

Parameter Type Description
jsonrpc String
id String
result Boolean