Bitcoin
Create Bitcoin Client
Object
TX
Name
Type
Content
txid
string
hash of the transaction.
hash
string
hash of the transaction.
size
int
size of the transaction.
version
char
version of the transaction.
vin
List of inputs into transaction
total_in
double
Total balance of transaction input
vout
List of outputs into transaction
total_out
double
Total balance of transaction output
in_count
int
Transaction input count
out_count
int
Transaction output count
fee
double
Transaction fee
fee_per_kb
double
Transaction fee per kb
locktime
int
If not 0, this tells when a transaction output is spendable.
block_hash
string
block hash including the transaction
block_height
int
block height including the transaction
time
int
The time contained in the block
confirmations
int
Transaction Confirmation Count
VIN
Name
Type
Content
txid
string
hash of the transaction
vout
int
the index of the output being redeemed from the origin transaction
scriptSig
object
signature script
addresses
array[string]
Bitcoin Address
value
double
Amount used
VOUT
Name
Type
Content
value
double
Amount received
n
int
Output index
scriptPubKey
object
the public key script used to pay coins
addresses
array[string]
Bitcoin Address
GetBlockChain
GET
https://api.blocksdk.com/v1/btc/block
Response
Name
Type
Content
height
int
number of most recent block.
bestblockhash
string
hash of most recent block.
prev_hash
string
Previous block hash of the most recent block
unconfirmed_count
int
Unconfirmed Transaction Count
low_fee_per_kb
double
Low Priority (7+ blocks)
medium_fee_per_kb
double
Medium Priority (3-6 blocks)
high_fee_per_kb
double
High Priority (1-2 blocks)
GetBlock
GET
https://api.blocksdk.com/v1/btc/block/{block}
Path Parameters
block
string
Block number or hash
Query Parameters
rawtx
boolean
Get transaction details
limit
number
Number of transactions to import
offset
number
Transaction List Offset
Response
Name
Type
Content
hash
string
hash of the block
confirmations
int
Block Confirmation Count
height
int
the block number
time
int
The date and time at which a block is mined.
tx
array
Transaction contained in the block
tx_count
int
The number of transactions contained in the block
input_total
double
Total input balance of transactions contained in the block
input_count
int
The number of inputs for all transactions in the block
out_total
double
Total output balance of transactions contained in the block
out_count
int
The number of outputs for all transactions in the block
fee_per_kb
double
Kb unit fee for all transactions in a block
fee_total
double
Total transaction fee
generation
double
Mining Compensation Including Fees
reward
double
Block Mining Reward
size
int
integer the size of this block in bytes.
prev_hash
string
Previous block hash
next_hash
string
Next block hash
GetAddressInfo
GET
https://api.blocksdk.com/v1/btc/address/{address}
Path Parameters
address
string
Bitcoin Address
Query Parameters
reverse
boolean
Reverse transaction information
rawtx
boolean
Get transaction details
offset
number
Transaction List Offset
limit
number
Number of Transaction to import
Response
Name
Type
Content
address
string
Bitcoin Address
tx
array
Transaction originated from address
tx_count
int
The number of transactions that occurred at the address
received_count
int
The number of transactions received from the address
received_total
double
Transaction amount received from the address
received_unconfirmed
double
Transaction amount not included in the block received from the address
spent_count
int
The number of transactions spent from the address
spent_total
double
Transaction amount spent from the address
spent_unconfirmed
double
Transaction amount not included in the block spent from the address
balance
double
Remaining balance
unconfirmed_count
int
Transaction count not included in address block
first_time
int
First Deal Creation Time at Address
last_time
int
Last transaction creation time from address
GetMemPool
GET
https://api.blocksdk.com/v1/btc/mempool
Query Parameters
limit
number
Number of transactions to import
offset
number
Transaction List Offset
rawtx
boolean
Get transaction details
GetAddressBalance
GET
https://api.blocksdk.com/v1/btc/address/{address}/balance
Path Parameters
address
string
Bitcoin Address
Response
Name
Type
Content
address
string
Bitcoin Address
balance
double
Balance of the address
unconfirmed_balance
double
Balance of transactions not included in the block of addresses
ListWallet
GET
https://api.blocksdk.com/v1/btc/wallet
Query Parameters
offset
number
Number of Address to import
limit
number
Address List offset
Response
Name
Type
Content
id
int
Unique ID of the wallet
name
string
Name specified when creating wallet
created_at
datetime
Date Wallet Was Created
CreateWallet
POST
https://api.blocksdk.com/v1/btc/wallet
Request Body
name
string
Wallet Name
Response
Name
Type
Content
id
id
Unique ID of the wallet
name
string
Wallet name
seed_wif
string
Seed private key of wallet(This key is not stored on the blocksdk server)
LoadWallet
POST
https://api.blocksdk.com/v1/btc/wallet/{wallet_id}/load
Load your wallet. The loaded wallet does not require seed_wif when using CreateAddress,SendToAddress,SendMany ※It is not recommended to use
Path Parameters
wallet_id
number
Wallet Unique ID
Request Body
password
string
Password to use when creating transaction or address
seed_wif
string
Wallet seed private key
UnloadWallet
POST
https://api.blocksdk.com/v1/btc/wallet/{wallet_id}/unload
Path Parameters
wallet_id
number
Wallet Unique ID
GetWalletBalance
GET
https://api.blocksdk.com/v1/btc/{wallet_id}/balance
Path Parameters
wallet_id
number
Wallet Unique ID
Response
Name
Type
Content
balance
double
Wallet Balance
unconfirmed_balance
double
Balance of transactions not included in the block of wallet
ListWalletAddress
GET
https://api.blocksdk.com/v1/btc/wallet/{wallet_td}/address
Path Parameters
wallet_id
string
Wallet Unique ID
Query Parameters
offset
string
Number of Address to import
limit
string
Number of transactions to import
address
string
Search by this address
hdkeypath
string
Search by this hdkeypath
Response
Name
Type
Content
address
string
Bitcoin Address
hdkeypath
string
The HD keypath if the key is HD and available
CreateWalletAddress
POST
https://api.blocksdk.com/v1/btc/wallet/{wallet_id}/address
Path Parameters
wallet_id
string
Wallet Unique ID
Request Body
password
string
Only available if the wallet is loaded.
seed_wif
string
Seed private key issued at wallet creation(Not necessary if your wallet is loaded)
Response
Name
Type
Content
address
string
Bitcoin Address
hdkeypath
string
The HD keypath if the key is HD and available
GetWalletTx
GET
https://api.blocksdk.com/v1/btc/wallet/{wallet_id}/transaction
Path Parameters
wallet_id
string
Wallet Unique ID
Request Body
category
string
Transaction type to import(all,receive,spent,unspent)
order
string
Sort deals to import(desc,asc)
offset
number
Number of Address to import
limit
number
Address List offset
Response
Name
Type
Content
txid
string
Transaction hash
category
string
receive or spent
address
string
Address where the transaction occurred
amount
double
Transaction balance amount
confirmations
int
Transaction Confirmation Count
SendToAddress
POST
https://api.blocksdk.com/v1/btc/wallet/{wallet_id}/sendtoaddress
Path Parameters
wallet_id
string
Wallet Unique ID
Request Body
subtractfeefromamount
boolean
The fee will be deducted from the amount being sent. The recipient will receive less coins than you enter in the amount field.
password
string
Only available if the wallet is loaded.
kbfee
number
Fee per kilobytes to be used for transactions
seed_wif
string
Seed private key issued at wallet creation(Not necessary if your wallet is loaded)
amount
number
balance to be sent
address
string
Bitcoin Address to Receive
Response
Return Tx on Success
SendMany
POST
https://api.blocksdk.com/v1/btc/wallet/{wallet_id}/sendmany
Path Parameters
wallet_id
string
Wallet Unique ID
Request Body
subtractfeefromamount
boolean
The fee will be deducted from the amount being sent. The recipient will receive less coins than you enter in the amount field.
password
string
Only available if the wallet is loaded.
to
object
Receiving Information
kbfee
number
Fee per kilobytes to be used for transactions
seed_wif
string
Seed private key issued at wallet creation(Not necessary if your wallet is loaded)
Example PostData
Response
Return Tx on Success
GetTransaction
GET
https://api.blocksdk.com/v1/btc/transaction/{hash}
Path Parameters
hash
string
transaction hash
Response
Return Tx on Success
TransactionTracking
GET
https://api.blocksdk.com/v1/btc/transaction/{hash}/tracking
Beta.Track sent and received transactions
Path Parameters
hash
string
Transaction ID
Response
TrackingObject
Name
Type
Content
txid
string
Transaction ID
height
int
Height of the block containing this transaction
addresses
Object
Addresses and amounts used or received in this transaction
input
array[TrackingObject]
List of inputs used in this transaction
output
array[TrackingObject]
List of outputs that received this transaction
time
int
Time when this transaction was included in the block
SendTransaction
POST
https://api.blocksdk.com/v1/btc/transaction
Request Body
sign_hex
string
signed transaction hex
Response
Return Tx on Success
Last updated
Was this helpful?