This document describes the specification for the API Miner public API.
This document has the specification, the main documentation can be found on the official Blockwell Docs website:
All users are limited to 10 requests per second and 3600 requests per hour.
Contact us if you need higher limits.
Contact us at:
General Blockwell chat: Blockwell Telegram
View the changelog at docs.blockwell.ai/tools/apiminer/changelog.html
List Token contracts belonging to the current user.
network | string Optional. Filter by network, see Ethereum networks. |
name | string Optional. Filter by Token name. |
symbol | string Optional. Filter by Token symbol. |
Array of objects (Token contract) |
{- "data": [
- {
- "id": "6ab34922-0561-48b7-9e11-ce1581e100f2",
- "name": "API Miner Coin",
- "network": "rinkeby",
- "address": "0x418f8020b48731ffd2a99afe0aa5e7d66ca263d8",
- "type": "erc20",
- "parameters": {
- "symbol": "APIMC",
- "decimals": 18,
- "supply": "100000000000000000000000000"
}
}
]
}
Get a specific token by its unique identifier.
contractId required | string ID of the token |
object (Token contract) |
{- "data": {
- "id": "6ab34922-0561-48b7-9e11-ce1581e100f2",
- "name": "API Miner Coin",
- "network": "rinkeby",
- "address": "0x418f8020b48731ffd2a99afe0aa5e7d66ca263d8",
- "type": "erc20",
- "parameters": {
- "symbol": "APIMC",
- "decimals": 18,
- "supply": "100000000000000000000000000"
}
}
}
Get the specified token balance for the current user's default account.
contractId required | string ID of the token. |
data | string Token balance of the address in the smallest unit. |
{- "data": "1000000000000000000"
}
Get the specified token balance for a specific account.
contractId required | string ID of the token. |
address required | string Address to get balance for. |
data | string Token balance of the address in the smallest unit. |
{- "data": "1000000000000000000"
}
Gets the transfer history for the specified token.
from | string Filter transfers by the from address. |
to | string Filter transfers by the to address. |
address | string Filter transfers where this address is either the sender or recipient. |
Array of objects (Token transfer) |
{- "data": [
- {
- "from": "0x0000000000000000000000000000000000000000",
- "to": "0xE7341C22c42a8150F521d70a5A1CeAD66727f462",
- "value": "6",
- "transactionHash": "0xdc03bf477c8f4e1279e35762346b69d29ed1bc93912eeb636c10f8fb14ae4781",
- "blockNumber": 157
}, - {
- "from": "0xE7341C22c42a8150F521d70a5A1CeAD66727f462",
- "to": "0x341481CeaC83d8C348508A3A13d1b4eac5a48186",
- "value": "1",
- "transactionHash": "0x00fef6c85aac9f34b0353859e479035dc1a92a7d9947423342b0743f9bc38fea",
- "blockNumber": 164
}
]
}
Submit a Token transfer to the blockchain.!!
Success means the transfer was accepted for processing, but there are no guarantees as to when the processing will be done. Processing happens on first-come-first-served basis.
A successful response contains a unique ID for the transaction, which can then be used to query its status.
Passing the optional callbacks
parameter in the body will add a web callback
that gets called once the transaction completes.
The callback payload is {"transaction": Transaction}
, with the same formatting
as with getting a transaction.
contractId required | string ID of the token. |
Token transfer request body.
to required | string Ethereum address to send Tokens to. |
value required | string^[0-9]$ Amount of Tokens to transfer, in the Token's smallest unit. |
from | string Address to send from, as either an Ethereum address, or an account ID. If not specified, the current user's default account will be used. |
callbacks | Array of strings Callback URL(s) to be notified when the Token transfer completes. See Callbacks for more details. |
callbackData | object An object holding data that the callbacks will contain. |
waitForAsset | string The address of an asset to wait for to be deposited before this transaction
should be processed. This can be an ERC-20 token address, or The maximum time the transaction can wait is one hour, after which it will fail. If specified, |
waitForValue | string When If specified, |
object (Transaction) |
{- "to": "0x98c4A022C1492Cc8a59F75295FBCf4a9F1Bc7cE8",
- "value": "1000000000000000000"
}
{- "data": {
- "id": "9969d904-fa6c-4bd5-91ce-f07002a3ee27",
- "type": "contract-method",
- "contractId": "6ab34922-0561-48b7-9e11-ce1581e100f2",
- "from": "0x418F8020b48731FfD2a99Afe0Aa5E7d66Ca263d8",
- "method": "transfer",
- "parameters": [
- "0x98c4A022C1492Cc8a59F75295FBCf4a9F1Bc7cE8",
- "1000000000000000000"
], - "status": "new",
- "created": "2018-06-12T22:20:42.804Z",
- "network": "rinkeby"
}
}
Get information for a token by network and address.
required | |
address required | string Example: 0x4CfC7bF1e8eB43d27DE0a4e648D9Cf3b6198D0EC Address of the contract to call. |
address | string Address of the token contract. |
name | string Name of the token. |
symbol | string Token symbol. |
decimals | number Number of decimals the token uses. |
totalSupply | string Total supply of the token, in smallest units. |
{- "address": "0x4CfC7bF1e8eB43d27DE0a4e648D9Cf3b6198D0EC",
- "name": "Pump Token",
- "symbol": "PUMP",
- "decimals": 18,
- "totalSupply": "1000000000000000000000000"
}
Get a token's circulating supply.
The supply is calculated by excluding accounts holding a certain ERC-721 token.
required | |
address required | string Example: 0x4CfC7bF1e8eB43d27DE0a4e648D9Cf3b6198D0EC Address of the contract to call. |
data | string Total circulating supply, in the token's smallest unit. |
{- "data": "1000000000000000000"
}
Get a token's total supply of tokens.
Typically this is equivalent to calling totalSupply
on the token contract.
required | |
address required | string Example: 0x4CfC7bF1e8eB43d27DE0a4e648D9Cf3b6198D0EC Address of the contract to call. |
data | string Total supply, in the token's smallest unit. |
{- "data": "1000000000000000000"
}
Search for smart contracts.
network | string Filter by network, see Ethereum networks. |
name | string Filter by Contract name. |
symbol | string Filter by Contract symbol. |
address | string Find contracts with a specific address. Note that the result may still include multiple networks if not filtered. |
source | boolean Pass true to have the server also return the source code of the contract, if it's available. |
text | string Perform a non-exact text search. Finds partial matches in symbol, contract name, and address.
Note that text search does not include ABI or source code in the results. |
id | string Retrieve multiple contracts by their IDs.
An alternative ID format is also supported, with Unlike with |
Array of objects (Smart contract) |
{- "data": [
- {
- "id": "6ab34922-0561-48b7-9e11-ce1581e100f2",
- "name": "API Miner Coin",
- "network": "rinkeby",
- "address": "0x418f8020b48731ffd2a99afe0aa5e7d66ca263d8",
- "type": "erc20",
- "parameters": {
- "symbol": "APIMC",
- "decimals": 18,
- "supply": "100000000000000000000000000"
}, - "abi": [
- {
- "constant": true,
- "inputs": [ ],
- "name": "name",
- "outputs": [
- {
- "name": "",
- "type": "string"
}
], - "payable": false,
- "stateMutability": "view",
- "type": "function"
}, - {
- "constant": false,
- "inputs": [
- {
- "name": "_spender",
- "type": "address"
}, - {
- "name": "_value",
- "type": "uint256"
}
], - "name": "approve",
- "outputs": [
- {
- "name": "",
- "type": "bool"
}
], - "payable": false,
- "stateMutability": "nonpayable",
- "type": "function"
}
]
}
]
}
Deploy a new smart contract.
This endpoint allows you to create a new deployment of a smart contract "template" in the system.
Success means the deployment was accepted for processing, but there are no guarantees as to when the processing will be done. Processing happens on first-come-first-served basis.
Contract deployments are basically just like regular Ethereum transactions, so a successful response will contain a transaction ID. That ID can then be used to query its status.
Passing the optional callbacks
parameter in the body will add a web callback
that gets called once the transaction completes. See
Callbacks for more details.
name required | string Full name for the Contract. |
network required | string The network the contract should be deployed on, see Ethereum networks. |
type | string Type of contract to deploy. |
bwtype | string Blockwell contract type to deploy. |
bwver | number Version of the Blockwell contract to deploy. |
account | string ID of the account to deploy under. If not specified, the user's default account will be used. |
parameters | object Parameters to be used when creating the contract. |
callbacks | Array of strings Callback URL(s) to be notified when the deployment completes. See Callbacks for more details. |
callbackData | object An object holding data that the callbacks will contain. |
object (Transaction) |
{- "name": "API Miner Coin",
- "network": "rinkeby",
- "type": "erc20",
- "parameters": {
- "symbol": "APIMC",
- "decimals": 18,
- "supply": "100000000000000000000000000",
- "holder": "0x418F8020b48731FfD2a99Afe0Aa5E7d66Ca263d8"
}
}
{- "data": {
- "id": "9969d904-fa6c-4bd5-91ce-f07002a3ee27",
- "type": "contract-deploy",
- "contractId": "6ab34922-0561-48b7-9e11-ce1581e100f2",
- "from": "0x418F8020b48731FfD2a99Afe0Aa5E7d66Ca263d8",
- "status": "new",
- "created": "2018-06-12T22:20:42.804Z",
- "network": "rinkeby"
}
}
Add an existing contract to the system.
The contract must already be deployed using other means, and an ABI must be provided in the body. The API will then respond with an API Miner ID for the contract and it can be interacted with like any other contract in API Miner.
Note that you must provide either type
or abi
. Use type
to map
the contract to an existing contract type,
or abi
to use an arbitrary ABI.
name | string Full name for the Contract. |
network required | string The network the contract should be deployed on, see Ethereum networks. |
address required | string The Ethereum address of the contract in the network. |
abi | Array of any The ABI JSON array for the contract. Must provide either this or |
type | string The contract type. Must provide either this or |
fromBlock | any Block number for when this contract was deployed. If specified, this is used to make lookups faster. |
object (Smart contract) |
{- "name": "API Miner Coin",
- "network": "rinkeby",
- "address": "0x418F8020b48731FfD2a99Afe0Aa5E7d66Ca263d8",
- "abi": [
- {
- "constant": true,
- "inputs": [ ],
- "name": "name",
- "outputs": [
- {
- "name": "",
- "type": "string"
}
], - "payable": false,
- "stateMutability": "view",
- "type": "function"
}, - {
- "constant": false,
- "inputs": [
- {
- "name": "_spender",
- "type": "address"
}, - {
- "name": "_value",
- "type": "uint256"
}
], - "name": "approve",
- "outputs": [
- {
- "name": "",
- "type": "bool"
}
], - "payable": false,
- "stateMutability": "nonpayable",
- "type": "function"
}
]
}
{- "data": {
- "id": "6ab34922-0561-48b7-9e11-ce1581e100f2",
- "name": "API Miner Coin",
- "network": "rinkeby",
- "address": "0x418f8020b48731ffd2a99afe0aa5e7d66ca263d8",
- "type": "erc20",
- "parameters": {
- "symbol": "APIMC",
- "decimals": 18,
- "supply": "100000000000000000000000000"
}, - "abi": [
- {
- "constant": true,
- "inputs": [ ],
- "name": "name",
- "outputs": [
- {
- "name": "",
- "type": "string"
}
], - "payable": false,
- "stateMutability": "view",
- "type": "function"
}, - {
- "constant": false,
- "inputs": [
- {
- "name": "_spender",
- "type": "address"
}, - {
- "name": "_value",
- "type": "uint256"
}
], - "name": "approve",
- "outputs": [
- {
- "name": "",
- "type": "bool"
}
], - "payable": false,
- "stateMutability": "nonpayable",
- "type": "function"
}
]
}
}
Get a specific Contract by its unique identifier.
contractId required | string ID of the Contract |
object (Smart contract) |
{- "data": {
- "id": "6ab34922-0561-48b7-9e11-ce1581e100f2",
- "name": "API Miner Coin",
- "network": "rinkeby",
- "address": "0x418f8020b48731ffd2a99afe0aa5e7d66ca263d8",
- "type": "erc20",
- "parameters": {
- "symbol": "APIMC",
- "decimals": 18,
- "supply": "100000000000000000000000000"
}, - "abi": [
- {
- "constant": true,
- "inputs": [ ],
- "name": "name",
- "outputs": [
- {
- "name": "",
- "type": "string"
}
], - "payable": false,
- "stateMutability": "view",
- "type": "function"
}, - {
- "constant": false,
- "inputs": [
- {
- "name": "_spender",
- "type": "address"
}, - {
- "name": "_value",
- "type": "uint256"
}
], - "name": "approve",
- "outputs": [
- {
- "name": "",
- "type": "bool"
}
], - "payable": false,
- "stateMutability": "nonpayable",
- "type": "function"
}
]
}
}
Make a view-only Contract call that isn't a transaction.
As an example, an ERC-20 token's balanceOf
method is view-only.
contractId required | string ID of the Contract. |
method required | string Contract method to call. |
arg | Array of any Method arguments. The server expects the 'arg' query string variable to repeat for multiple
array elements, eg. |
data | any Return value of the Contract call. |
{- "data": "1000000000000000000"
}
Make a batch of Contract and JSON-RPC calls that are view-only.
As an example, an ERC-20 token's balanceOf
method is view-only.
Array of objects Array of calls. Response is guaranteed to be in the same order. |
Array of objects or objects |
{- "calls": [
- {
- "contractId": "6ab34922-0561-48b7-9e11-ce1581e100f2",
- "method": "balanceOf",
- "arg": [
- "0x9A83706D363e2Fd14103f587EA4bb27B2b2f3Ae6"
]
}, - {
- "address": "0x98c4A022C1492Cc8a59F75295FBCf4a9F1Bc7cE8",
- "network": "rinkeby",
- "type": "erc20",
- "method": "balanceOf",
- "arg": [
- "0x9A83706D363e2Fd14103f587EA4bb27B2b2f3Ae6"
]
}
]
}
{- "data": [
- {
- "data": "10000"
}, - {
- "code": "not_found",
- "message": "Contract not found"
}, - {
- "data": "5"
}
]
}
Submit a Contract method transaction to the blockchain.
This is required for making smart Contract method calls that change state,
such as the ERC-20 token's transfer
method.
Success means the transaction was accepted for processing, but there are no guarantees as to when the processing will be done. Processing happens on first-come-first-served basis.
A successful response contains a unique ID for the transaction, which can then be used to query its status.
Passing the optional callbacks
parameter in the body will add a web callback
that gets called once the transaction completes.
The callback payload is {"transaction": Transaction}
, with the same formatting
as with getting a transaction.
contractId required | string ID of the Contract. |
method required | string Contract method to call. |
from | string Address to send from, as either an Ethereum address, or an account ID. If not specified, the current user's default account will be used. |
arg | Array of any Array of arguments to pass to the contract method call. |
callbacks | Array of strings Callback URL(s) to be notified when the Token transfer completes. See Callbacks for more details. |
callbackData | object An object holding data that the callbacks will contain. |
dependency | string The ID of a transaction this new transaction depends on. This new transaction won't be sent until the dependency has resolved successfully. |
waitForAsset | string The address of an asset to wait for to be deposited before this transaction
should be processed. This can be an ERC-20 token address, or The maximum time the transaction can wait is one hour, after which it will fail. If specified, |
waitForValue | string When If specified, |
object (Transaction) |
{- "arg": [
- "0x98c4A022C1492Cc8a59F75295FBCf4a9F1Bc7cE8",
- "1000000000000000000"
]
}
{- "data": {
- "id": "9969d904-fa6c-4bd5-91ce-f07002a3ee27",
- "type": "contract-method",
- "contractId": "6ab34922-0561-48b7-9e11-ce1581e100f2",
- "from": "0x418F8020b48731FfD2a99Afe0Aa5E7d66Ca263d8",
- "method": "transfer",
- "parameters": [
- "0x98c4A022C1492Cc8a59F75295FBCf4a9F1Bc7cE8",
- "1000000000000000000"
], - "status": "new",
- "created": "2018-06-12T22:20:42.804Z",
- "network": "rinkeby"
}
}
Gets the log history for a all events for a specific Contract.
All query parameters will be passed as filters to event parameters. This lets you filter on indexed event parameters. For example, to get all token transfer events from a particular address, you could use:
?from=0x9A83706D363e2Fd14103f587EA4bb27B2b2f3Ae6
Multiple entries of a parameter will be added as an OR to the filter, for example to get all transfers from two different addresses:
?from=0x9A83706D363e2Fd14103f587EA4bb27B2b2f3Ae6&from=0x418F8020b48731FfD2a99Afe0Aa5E7d66Ca263d8
One special query parameter is accepted, fromBlock
, which will limit the
search to starting from a specific block number.
contractId required | string ID of the Contract. |
fromBlock | number The block number to start the search from. |
toBlock | string The block number to end the search at. Also accepts |
Array of objects (Smart Contract event) |
{- "data": [
- {
- "address": "0x418F8020b48731FfD2a99Afe0Aa5E7d66Ca263d8",
- "blockNumber": 1258992,
- "transactionHash": "0x191b689b1a00ac89e474fbc9a3bee7c612b0068746ad0d7d41e06119515f4912",
- "transactionIndex": 0,
- "blockHash": "0x628b8a2ad02fef123bd046d4771deff2e5eb9f475736bcdd7f8f90a3a8902f94",
- "logIndex": 0,
- "removed": false,
- "id": "log_340f11be",
- "returnValues": {
- "0": "0x9A83706D363e2Fd14103f587EA4bb27B2b2f3Ae6",
- "1": "0x98c4A022C1492Cc8a59F75295FBCf4a9F1Bc7cE8",
- "2": "1000000000000000000",
- "from": "0x9A83706D363e2Fd14103f587EA4bb27B2b2f3Ae6",
- "to": "0x98c4A022C1492Cc8a59F75295FBCf4a9F1Bc7cE8",
- "value": "1000000000000000000"
}, - "event": "Transfer",
- "signature": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
- "raw": {
- "data": "0x0000000000000000000000000000000000000000000000000de0b6b3a7640000",
- "topics": [
- "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
- "0x0000000000000000000000009a83706d363e2fd14103f587ea4bb27b2b2f3ae6",
- "0x00000000000000000000000098c4a022c1492cc8a59f75295fbcf4a9f1bc7ce8"
]
}
}
]
}
Gets the log history for a specific event for a specific Contract.
All query parameters will be passed as filters to event parameters. This lets you filter on indexed event parameters. For example, to get all token transfer events from a particular address, you could use:
?from=0x9A83706D363e2Fd14103f587EA4bb27B2b2f3Ae6
Multiple entries of a parameter will be added as an OR to the filter, for example to get all transfers from two different addresses:
?from=0x9A83706D363e2Fd14103f587EA4bb27B2b2f3Ae6&from=0x418F8020b48731FfD2a99Afe0Aa5E7d66Ca263d8
One special query parameter is accepted, fromBlock
, which will limit the
search to starting from a specific block number.
contractId required | string ID of the Contract. |
event required | string Name of the event. |
fromBlock | number The block number to start the search from. |
toBlock | string The block number to end the search at. Also accepts |
Array of objects (Smart Contract event) |
{- "data": [
- {
- "address": "0x418F8020b48731FfD2a99Afe0Aa5E7d66Ca263d8",
- "blockNumber": 1258992,
- "transactionHash": "0x191b689b1a00ac89e474fbc9a3bee7c612b0068746ad0d7d41e06119515f4912",
- "transactionIndex": 0,
- "blockHash": "0x628b8a2ad02fef123bd046d4771deff2e5eb9f475736bcdd7f8f90a3a8902f94",
- "logIndex": 0,
- "removed": false,
- "id": "log_340f11be",
- "returnValues": {
- "0": "0x9A83706D363e2Fd14103f587EA4bb27B2b2f3Ae6",
- "1": "0x98c4A022C1492Cc8a59F75295FBCf4a9F1Bc7cE8",
- "2": "1000000000000000000",
- "from": "0x9A83706D363e2Fd14103f587EA4bb27B2b2f3Ae6",
- "to": "0x98c4A022C1492Cc8a59F75295FBCf4a9F1Bc7cE8",
- "value": "1000000000000000000"
}, - "event": "Transfer",
- "signature": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
- "raw": {
- "data": "0x0000000000000000000000000000000000000000000000000de0b6b3a7640000",
- "topics": [
- "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
- "0x0000000000000000000000009a83706d363e2fd14103f587ea4bb27b2b2f3ae6",
- "0x00000000000000000000000098c4a022c1492cc8a59f75295fbcf4a9f1bc7ce8"
]
}
}
]
}
Make a view-only Contract call to an arbitrary contract address without needing to add the contract to API Miner.
A contract type must be provided so an ABI can be determined for the contract.
required | |
address required | string Example: 0x98c4A022C1492Cc8a59F75295FBCf4a9F1Bc7cE8 Address of the contract to call. |
method required | string Contract method to call. |
type required | string Type of the contract to use for determining its ABI. |
arg | Array of strings Method arguments. The server expects the 'arg' query string variable to repeat for multiple
array elements, eg. |
data | any Return value of the Contract call. |
{- "data": "1000000000000000000"
}
Submit a method transaction to the blockchain directly to a contract without needing to add it to API Miner first.
A contract type must be provided so an ABI can be determined for the contract.
Success means the transaction was accepted for processing, but there are no guarantees as to when the processing will be done. Processing happens on first-come-first-served basis.
A successful response contains a unique ID for the transaction, which can then be used to query its status.
required | |
address required | string Example: 0x98c4A022C1492Cc8a59F75295FBCf4a9F1Bc7cE8 Address of the contract to send to. |
method required | string Contract method to send. |
type required | string A contract type for determining an ABI for the contract. |
from | string Address to send from, as either an Ethereum address, or an account ID. If not specified, the current user's default account will be used. |
arg | Array of any Array of arguments to pass to the contract method call. |
dependency | string The ID of a transaction this new transaction depends on. This new transaction won't be sent until the dependency has resolved successfully. |
waitForAsset | string The address of an asset to wait for to be deposited before this transaction
should be processed. This can be an ERC-20 token address, or The maximum time the transaction can wait is one hour, after which it will fail. If specified, |
waitForValue | string When If specified, |
object (Transaction) |
{- "type": "erc20",
- "arg": [
- "0x98c4A022C1492Cc8a59F75295FBCf4a9F1Bc7cE8",
- "1000000000000000000"
]
}
{- "data": {
- "id": "9969d904-fa6c-4bd5-91ce-f07002a3ee27",
- "type": "contract-method",
- "from": "0x418F8020b48731FfD2a99Afe0Aa5E7d66Ca263d8",
- "method": "transfer",
- "parameters": [
- "0x98c4A022C1492Cc8a59F75295FBCf4a9F1Bc7cE8",
- "1000000000000000000"
], - "status": "new",
- "created": "2018-06-12T22:20:42.804Z",
- "network": "rinkeby"
}
}
Retrieve the latest block from the network specified in the parameters.
required |
transactions | string Example: transactions=true Whether to include transaction data with the block |
{- "data": {
- "number": 3,
- "hash": "0xef95f2f1ed3ca60b048b4bf67cde2195961e0bba6f70bcbea9a2c4e133e34b46",
- "parentHash": "0x2302e1c0b972d00932deb5dab9eb2982f570597d9d42504c05d9c2147eaf9c88",
- "nonce": "0xfb6e1a62d119228b",
- "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
- "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
- "transactionsRoot": "0x3a1b03875115b79539e5bd33fb00d8f7b7cd61929d5a3c574f507b8acf415bee",
- "stateRoot": "0xf1133199d44695dfa8fd1bcfe424d82854b5cebef75bddd7e40ea94cda515bcb",
- "miner": "0x8888f1f195afa192cfee860698584c030f4c9db1",
- "difficulty": "21345678965432",
- "totalDifficulty": "324567845321",
- "size": 616,
- "extraData": "0x",
- "gasLimit": 3141592,
- "gasUsed": 21662,
- "timestamp": 1429287689,
- "transactions": [
- "0x9fc76417374aa880d4449a1f7f31ec597f00b1f6f3dd2d66f4c9c6c445836d8b"
], - "uncles": [ ]
}
}
Retrieve a specific block from the given network.
required | |
number required | number Example: 3 Block number. |
transactions | string Example: transactions=true Whether to include transaction data with the block |
{- "data": {
- "number": 3,
- "hash": "0xef95f2f1ed3ca60b048b4bf67cde2195961e0bba6f70bcbea9a2c4e133e34b46",
- "parentHash": "0x2302e1c0b972d00932deb5dab9eb2982f570597d9d42504c05d9c2147eaf9c88",
- "nonce": "0xfb6e1a62d119228b",
- "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
- "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
- "transactionsRoot": "0x3a1b03875115b79539e5bd33fb00d8f7b7cd61929d5a3c574f507b8acf415bee",
- "stateRoot": "0xf1133199d44695dfa8fd1bcfe424d82854b5cebef75bddd7e40ea94cda515bcb",
- "miner": "0x8888f1f195afa192cfee860698584c030f4c9db1",
- "difficulty": "21345678965432",
- "totalDifficulty": "324567845321",
- "size": 616,
- "extraData": "0x",
- "gasLimit": 3141592,
- "gasUsed": 21662,
- "timestamp": 1429287689,
- "transactions": [
- "0x9fc76417374aa880d4449a1f7f31ec597f00b1f6f3dd2d66f4c9c6c445836d8b"
], - "uncles": [ ]
}
}
Get the status of a pending transaction.
id required | string Transaction ID. |
object (Transaction) |
{- "data": {
- "id": "8c9a4558-93cb-4d6a-821c-77ea1ca9adad",
- "status": "completed",
- "created": "2018-06-08T19:04:14.216Z",
- "submitted": "2018-06-08T19:04:14.980Z",
- "ended": "2018-06-08T19:04:29.050Z",
- "transactionHash": "0xe1eabd59aea1857bc5eb52d42415b76cfe539e9d650903d85accd3cd9c3d36c0"
}
}
Get the current user's transaction history.
contractId | string Filter by contract ID. |
from | string Filter by 'from'. Can be either the account ID, or Ethereum address. |
method | string Filter by contract method used. |
status | string Filter by transaction status. |
contractAddress | string Filter by contract address. |
text | string Text search. |
sort | string Example: sort=status -created Sort by fields. Can sort by multiple fields with space separated field names, and
descending sort by using a |
pageSize | integer Maximum size of results page. Defaults to 50. |
page | integer Number of the page to retrieve. |
Array of objects (Transaction) |
{- "data": [
- {
- "id": "string",
- "type": "transaction",
- "contractId": "string",
- "from": "string",
- "method": "string",
- "parameters": [
- null
], - "status": "new",
- "created": "2019-08-24T14:15:22Z",
- "submitted": "2019-08-24T14:15:22Z",
- "ended": "2019-08-24T14:15:22Z",
- "error": "string",
- "transactionHash": "string",
- "events": [
- { }
], - "network": "string",
- "waitForAsset": {
- "status": "waiting",
- "address": "string",
- "value": "string",
- "waitedCount": 0
}
}
]
}
Submit a new Ether transaction to the specified network.
Success means the transaction was accepted for processing, but there are no guarantees as to when the processing will be done. Processing happens on first-come-first-served basis.
A successful response contains a unique ID for the transaction, which can then be used to query its status.
required | string or number The network to use, see Ethereum networks. |
to required | string Ethereum address to send Ether to. |
value required | string^[0-9]$ Amount of Ether to transfer, in wei. |
from | string Address to send from, as either an Ethereum address, or an account ID. If not specified, the current user's default account will be used. |
callbacks | Array of strings Callback URL(s) to be notified when the Token transfer completes. See Callbacks for more details. |
callbackData | object An object holding data that the callbacks will contain. |
waitForAsset | string The address of an asset to wait for to be deposited before this transaction
should be processed. This can be an ERC-20 token address, or The maximum time the transaction can wait is one hour, after which it will fail. If specified, |
waitForValue | string When If specified, |
object (Transaction) |
{- "network": "rinkeby",
- "to": "0x98c4A022C1492Cc8a59F75295FBCf4a9F1Bc7cE8",
- "value": "1000000000000000000"
}
{- "data": {
- "id": "9969d904-fa6c-4bd5-91ce-f07002a3ee27",
- "status": "new",
- "created": "2018-06-12T22:20:42.804Z"
}
}
Get a public key used for web callback request signing.
The ID can be given as default
, in which case the current default key is used.
Responses always contain the Key-Id
header for identifying public keys. See
Callbacks for more details.
id required | string Public key ID. |
Key-Id | string Public key ID. |
-----BEGIN PUBLIC KEY----- MIICIjAN... -----END PUBLIC KEY-----
List Accounts belonging to the current user.
Array of objects (Account) |
{- "data": [
- {
- "id": "bf15bdb2-0574-5982-a199-08fab9ac59f1",
- "address": "0xa46b6126a261cf6bdca70216742b09ca2c31f73b",
- "owner": "4b17b28b-2409-54b6-bf43-f36fe8bced4e",
- "defaultAccount": true
}, - {
- "id": "db7d6a7b-527c-5ae9-ae61-87a4eb7a7112",
- "address": "0xa46b6126a261cf6bdca70216742b09ca2c31f73c",
- "owner": "4b17b28b-2409-54b6-bf43-f36fe8bced4e",
- "defaultAccount": false
}
]
}
Generates a new Ethereum account.
If an owner ID is specified, the account will be created for that user. Otherwise, the account will belong to the authenticated user.
owner | string User ID for the owner of the new account. If not specified, the current user will be used instead. |
default | boolean If this is set to true, the account will be made the user's default account. |
object (Account) |
{- "default": false
}
{- "data": {
- "id": "bf15bdb2-0574-5982-a199-08fab9ac59f1",
- "address": "0xa46b6126a261cf6bdca70216742b09ca2c31f73b",
- "owner": "4b17b28b-2409-54b6-bf43-f36fe8bced4e",
- "defaultAccount": false
}
}
Get a specific Account by its ID.
accountId required | string ID of the Account |
object (Account) |
{- "data": {
- "id": "bf15bdb2-0574-5982-a199-08fab9ac59f1",
- "address": "0xa46b6126a261cf6bdca70216742b09ca2c31f73b",
- "owner": "4b17b28b-2409-54b6-bf43-f36fe8bced4e",
- "defaultAccount": true
}
}
Get the current user's default account.
object (Account) |
{- "data": {
- "id": "bf15bdb2-0574-5982-a199-08fab9ac59f1",
- "address": "0xa46b6126a261cf6bdca70216742b09ca2c31f73b",
- "owner": "4b17b28b-2409-54b6-bf43-f36fe8bced4e",
- "defaultAccount": true
}
}
Sign a personal or EIP-191 message with the current user's default account.
message required | string |
string or object (Signature response) Signature data for message signing. |
{- "message": "This is a message!"
}
{- "data": "string"
}
Sign a personal or EIP-191 message with the specified account.
accountId required | string ID of the Account |
message required | string |
string or object (Signature response) Signature data for message signing. |
{- "message": "This is a message!"
}
{- "data": "string"
}
Get the Ether balance of an account.
account required | string ID of the account, address of the account, or |
network required | string The Ethereum network to read. |
data | string Ether balance of the address in Wei. |
{- "data": "1500000000000000000"
}
Search for users based on parameters.
If an external ID is specified, the name parameter is ignored.
If no parameters are supplied, the endpoint returns all users the current user has created.
externalId | string User external ID. |
name | string User name. |
Array of objects (User) |
{- "data": [
- {
- "id": "string",
- "name": "string",
- "groups": [
- "string"
], - "externalId": "string",
- "externalData": { },
- "created": "string"
}
]
}
Creates a new user.
If an owner ID is specified, the account will be created for that user. Otherwise, the account will belong to the authenticated user.
name | string A name for the user. This does not have to be unique, it's simply for informational purposes. |
externalId | string An arbitrary identifier for external use. Typically you would set this to an ID used in your application for the user. |
externalData | object Arbitrary data associated with this user. There are certain restrictions on this data to avoid security issues. The restrictions are the same as for callback data. |
auth | boolean If set to true, a new authentication token for the user will be returned as well. |
account | boolean If set to true, a default Ethereum account will also be created for the user. |
ownerless | boolean If set to true, the user will be created without an owner. In practice, not having an owner means the previous user cannot access the new user, or create auth tokens for the user. |
object (User) | |
auth | string User auth token, if requested. |
object (Account) |
{- "auth": true,
- "account": true
}
{- "data": {
- "id": "4b17b28b-2409-54b6-bf43-f36fe8bced4e"
}
}
Get a user by its ID.
userId required | string User ID. |
object (User) |
{- "data": {
- "id": "string",
- "name": "string",
- "groups": [
- "string"
], - "externalId": "string",
- "externalData": { },
- "created": "string"
}
}
Update data associated with the user.
Note that this endpoint does allow you to change the user's externalId
, even
though that should rarely be needed.
If a field is not present in the request body, its value is left unchanged. To
clear the value of an existing field, use null
.
userId required | string User ID. |
name | string A name for the user. This does not have to be unique, it's simply for informational purposes. |
externalId | string An arbitrary identifier for external use. Typically you would set this to an ID used in your application for the user. |
externalData | object Arbitrary data associated with this user. There are certain restrictions on this data to avoid security issues. The restrictions are the same as for callback data. |
{- "name": "New User"
}
Generates a new access token for the current user.
revoke | boolean If specified as true, all old access tokens will be revoked. |
data | string New access token |
{- "revoke": false
}
{- "data": "abcd1234"
}
Generates a new access token for the given user.
Note that you can only authenticate users you have ownership over.
userId required | string User ID. |
revoke | boolean If specified as true, all old access tokens will be revoked. |
data | string New access token |
{- "revoke": false
}
{- "data": "abcd1234"
}