Nobody's Cryptocurrency API
Introduction
Generate crypto addresses - Send, receive crypto - Retrieve real-time price information. Now support: Bitcoin, Ethereum, Binance Smart Chain and TRON.
From startups to large enterprises, thousands of businesses of all sizes use Nobody’s crypto APIs to build, run, and scale applications.
All documents here will be continuously updated with the desire to best serve the developer community.
This documentation describes all of the available API calls and properties of the returned objects. If you have any questions, please reach out to [email protected].
Getting Started
Endpoint
Remote Procedure Call (RPC) Endpoints are your gateway to communicate with and read data from the blockchain. For maximum trustlessness, you run an ETC Client locally; a local endpoint is usually made available at http://localhost:8545
.
Public Ethereum Classic RPC endpoints are also available, provided either for free to the community or as a subscription service. Because you can sign and broadcast transactions locally using a wallet such as MetaMask, public endpoints can be used whilst maintaining custody of your private keys.
You can use these URLs to transact and deploy to ETC (or it's testnets) by updating your wallet or deployment tool configuration. Make sure you also change your Chain ID to 61
for Ethereum Classic mainnet.
It is recommended to select one of the realtime-monitored ETC RPC endpoints over at ChainList.org.
Here are some free endpoints you can use right now:
Network | Endpoint |
---|---|
Ethereum Mainnet | https://cloudflare-eth.com/ |
Binance Mainnet | https://bsc-dataseed.binance.org/ |
Binance Testnet | https://data-seed-prebsc-1-s1.binance.org:8545/ |
TRON Mainnet | https://api.trongrid.io |
TRON Shasta Testnet | https://api.shasta.trongrid.io |
TRON Nile Testnet | https://nile.trongrid.io |
Postman
The simplest way to understand how to use the API is through Postman. All our APIs are public here:
How to use?
- List all available APIs with examples.
- API will use GET or POST method.
- In the API’s URL, the variable
{{url}}
ishttps://api.nobody.network
.
- Params, Headers and Body contain the input data:
- Headers: Some APIs require
endpoint
to connect to node. Endpoint is a URL that uses HTTPS or WWS protocol. You can get the endpoint on chainstack.com, quicknode.com…
- Params: Input data for APIs using the GET protocol.
- Body: Input JSON data for APIs using the POST protocol.
- Headers: Some APIs require
- Output JSON data returned by the API:
- success:
false
is failure andtrue
is success.
- message: More description of the returned result.
- data: All returned data.
- success:
Understanding API links
Let's say you want to call an API to create a Bitcoin account. You will see:
- Link on Postman:
{{btc}}
/accounts/create
- Link on this document: accounts/create
⇒ Actually, the full link of the API is https://api.nobody.network/btc/accounts/create
We will have the following table variables:
Variable | Value |
{{btc}} | https://api.nobody.network/btc |
{{eth}} | https://api.nobody.network/eth |
{{bnb}} | https://api.nobody.network/bnb |
{{trx}} | https://api.nobody.network/trx |
Understanding methods and input parameters
All APIs use GET
or POST
methods and need to pass the endpoint in the header.
- Method
GET
:- The input parameters are passed directly to the API link.
- Example:
{{btc}}
/getBalance?address=1KFHE7w8BhaENAswwryaoccDb6qcT6DbYY
- Method
POST
:- The input parameter is an array of data in JSON format.
- Example:
{ "privateKey": "cQzBv6xAYoFeLwsPB1mTBYJhHdsmNArzAFncJacocog1X4JrnkCt", "to": "1CaCSEwHJHyHK1g9eLwGHYp99KquBkarzL", "amount": "0.0005" }
Understanding API responese
All API calls will return JSON with a success
a message
and a data
property. Exceptions to this will be specified in the documentation.
You should always attempt to JSON decode the response, then use the success property to determine if the API call succeeded.
{ "success": true, "message": "What happened?", "data": [] }
The message
property will be an error_message
or an success_message
to help you determine what happened.
{ "success": false, "message": "Invalid hash.", "data": "" }
API Reference
POST
accounts/create
Generates an account with address and private key.
Returns
address
: The address to receive coins or tokens into your account.
privateKey
: A secret string used to sign transactions, similar to a password. This should never be shared or stored unencrypted in localstorage!
POST
accounts/privateKeyToAccount
Creates an account from a private key.
Parameters
privateKey
: The private key to import.
- [Optional]
ignoreLength
-Boolean
: If set to true does theprivateKey
length not get validated.
Returns
address
: The address to receive coins or tokens into your account.
privateKey
: A secret string used to sign transactions, similar to a password. This should never be shared or stored unencrypted in localstorage!
GET
getBalance
Get the coin balance of an address.
Headers
endpoint
: URL of public endpoint for connecting to blockchain.
Parameters
address
: The address to get the balance of.
Returns
- The current balance for the given address in BTC / ETH / BNB / TRX.
GET
getTransaction
Returns a transaction matching the given transaction hash.
Headers
endpoint
: URL of public endpoint for connecting to blockchain.
Parameters
transactionHash
: The transaction hash.
Returns
basic
: Useful information often used.mined
-Boolean
: This transaction is in the mining block or not.
from
: Sending address.
to
: Receiving address.
value
: The number of coins.
fee
: Gas fee in coin.
tokenTransfer
: Information of the transaction sending the token.contractAddress
: Contract address.
from
: Sending address.
to
: Receiving address.
value
: The number of tokens.
transaction
: Returns a transaction matching the given transaction hash.
transactionReceipt
: Returns the receipt of a transaction by transaction hash.
GET
getGasPriceInGwei
Returns the current gas price in gwei. The gas price is determined by the last few blocks median gas price.
Headers
endpoint
: URL of public endpoint for connecting to blockchain.
Returns
- Number string of the current gas price in gwei.
POST
transfer
Sends coins to an address.
Headers
endpoint
: URL of public endpoint for connecting to blockchain.
Parameters
privateKey
: The private key of sending account.
to
: The address of receiving account.
value
: Number of coins to be sent.
gasPriceInGwei
: The amount of Gwei that you are willing to spend on each unit of Gas.
gasLimit
: The maximum amount of Gas that you are willing to pay for this transaction.
Returns
transactionHash
: The transaction hash after transfer coins.
GET
[token]/getBalance
Get the token balance of an address.
Headers
endpoint
: URL of public endpoint for connecting to blockchain.
Parameters
contractAddress
: Contract address of the token.
address
: The address to get the balance of.
Returns
- The current balance for the given address in token unit.
POST
[token]/transfer
Sends tokens to an address.
Headers
endpoint
: URL of public endpoint for connecting to blockchain.
Parameters
contractAddress
: Contract address of the token.
privateKey
: The private key of sending account.
to
: The address of receiving account.
value
: Number of coins to be sent.
gasPriceInGwei
: The amount of Gwei that you are willing to spend on each unit of Gas.
gasLimit
: The maximum amount of Gas that you are willing to pay for this transaction.
Returns
transactionHash
: The transaction hash after transfer tokens.
API Reference (TRX only)
GET
getConfirmedTransaction
Gets a confirmed transaction by transaction ID.
Headers
endpoint
: URL of public endpoint for connecting to blockchain.
Parameter
transactionHash
: The transaction hash.
Returns
basic
: Useful information often used.from
: Sending address.
to
: Receiving address.
value
: The number of coins.
fee
: Gas fee in TRX.
tokenTransfer
: Information of the transaction sending the token.contractAddress
: Contract address.
from
: Sending address.
to
: Receiving address.
value
: The number of tokens.
transaction
: Returns a transaction matching the given transaction hash.
transactionReceipt
: Returns the receipt of a transaction by transaction hash.
GET
getBandwidth
Query the Bandwidth information for the account.
Headers
endpoint
: URL of public endpoint for connecting to blockchain.
Returns
- Amount of available bandwidth.
GET
getCurrentBlock
Return the block information of the latest block.
Headers
endpoint
: URL of public endpoint for connecting to blockchain.
Returns
- The block information of the latest block.
GET
getBlock
Gets a block by height/ID. If none is provided, it returns the default block.
Headers
endpoint
: URL of public endpoint for connecting to blockchain.
Parameters
block
: ID or height for the block.
Returns
- The block information.
GET
getBlockByHash
Gets a block by block hash.
Headers
endpoint
: URL of public endpoint for connecting to blockchain.
Parameters
blockHash
: Hash of block.
Returns
- The block information.
GET
getBlockByNumber
Gets a block by height or ID.
Headers
endpoint
: URL of public endpoint for connecting to blockchain.
Parameters
block
: ID or height for the block.
Returns
- The block information.
GET
getBlockTransactionCount
Gets the count of transactions within a block.
Headers
endpoint
: URL of public endpoint for connecting to blockchain.
Parameters
block
: ID or height for the block.
Returns
- The count of transactions within a block.
GET
getTransactionFromBlock
Returns a transaction based on a block hash or number and the transactions index position.
Headers
endpoint
: URL of public endpoint for connecting to blockchain.
Parameters
block
: ID or height for the block.
Returns
- The array of transactions from a block, if there are any.
GET
getTransactionsToAddress
Returns a transaction based on a block hash or number and the transactions index position.
Headers
endpoint
: URL of public endpoint for connecting to blockchain.
Parameters
address
: Address to query.
limit
: Limit amount of returned tx.
offset
: Offset to return from.
Returns
- All the confirmed transactions sent to an address. This will not return any unconfirmed transactions.
GET
getTransactionsFromAddress
Gets the transactions sent from an address.
Headers
endpoint
: URL of public endpoint for connecting to blockchain.
Parameters
address
: Address to query.
limit
: Limit amount of returned tx.
offset
: Offset to return from.
Returns
- The transactions sent from an address.
GET
getTransactionsRelated
Gets all transactions involving a specified address.
Headers
endpoint
: URL of public endpoint for connecting to blockchain.
Parameters
address
: Address to query.
direction
: The specified direction of transactions.
limit
: Limit amount of returned tx.
offset
: Offset to return from.
Returns
- All transactions involving a specified address.
GET
getAccount
Get account from address.
Headers
endpoint
: URL of public endpoint for connecting to blockchain.
Parameters
address
: Address of account.
Returns
- Account information.
Crypto donation
Quick scan QR code
Addresse
BTC
1GY9epXe3tiVPPZ69wCnwxvfFKu6MqdxQT
ETH
0x66867f4da1dd0906eb48c48de19f1a4808c25d60
BNB
0x66867f4da1dd0906eb48c48de19f1a4808c25d60
TRX
TJ24GCLEKsREib5YQfvaztesJprrX8r72b