f(x)Core REST API

Methods and endpoints additional resources

There are many endpoints and methods for REST API. Since f(x)Core is built on cosmos-sdk, some existing cosmos endpoints would be exposed as well. You may find a list of
Depending on the type of requests, you may specify the header, parameters and body, but generally a query should look like the following:
curl <node_endpoint>/<path>
For example:
Request path: /cosmos/bank/v1beta1/supply
Method: GET
curl https://fx-rest.functionx.io/cosmos/bank/v1beta1/supply
Response

Other examples:

Requesting the details of the address

Request Path: /cosmos/auth/v1beta1/accounts/{address}

Method GET
Path Parameters: address(string) -- f(x)Core address (example: fx1zgpzdf2uqla7hkx85wnn4p2r3duwqzd8xst6v2)
Response

Requesting the balance of the address

Request Path: /cosmos/bank/v1beta1/balances/{address}

Method GET
Path Parameters: address(string) -- f(x)Core address(example: fx1zgpzdf2uqla7hkx85wnn4p2r3duwqzd8xst6v2)
Response

Requesting the current token supply of $FX token

  • Total circulating supply of $FX = Delegated asset $FX + Non-delegated asset $FX
    • Delegated asset $FX = Total $FX that delegated in f(x)Core validator node
    • Non-delegated asset $FX = Ethereum cross chain locked fund + Unclaimed reward of validator (including commission and transaction fee) + Unclaimed reward of delegator + Wallet balance + Pool of ecosystem and community + Locked fund of Governance
    • Ethereum cross chain locked fund = Total $FX (ERC20) on Ethereum

Request Path: /cosmos/bank/v1beta1/supply

Method GET
Path Parameters: None
Response
Copy link
On this page
Methods and endpoints additional resources
Other examples: