My Wallet users can interact with their wallet using our JSON RPC api. It is intended to be fully compatible with the original Florijncoind RPC protocol however some method calls are not supported.

  • No Blockchain Download – Save on bandwidth and disk space.
  • No Need to run Florijncoind – Some VPS and shared hosting plans do not allow you to run custom processes
  • Use Existing software – Most existing software that uses the Florijncoind rpc calls will work transparently using blockhain.info
  • Payment notifications
  • Live synchronization with the web interface

Original Documentation available at https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list

Authentication

-rpcuser Should be set to your wallet identifier. This is a 36 character random string which can be found on your wallet login page.
-rpcpassword Should be set to your main wallet password. If double encryption is enabled your second password will need to be set using walletpassphrase
-rpcport Should be set to 443 for https:// (when the -rpcssl is provided) or 80 for plain text http://
-rpcssl Set to use a secure connection (Recommended)

Security

This api is currently incompatible with two factor authentication and it must therefore be disabled. We HIGHLY recommend you enable double encryption which can be found on the My Wallet account details page.

Unlike when using the javascript wallet transaction signing is conducted server side, which means your private keys are shared with the server. However many operations such as fetching a balance and viewing transactions are possible without needing to decrypt the private keys. The is possible through the use of double encryption only when the second password is provided does the server have ability to access the funds in a wallet. For merchants who need to only receive transactions it maybe possible to never provide a second password.

If transactions can be delayed and are able to be manually reviewed we highly recommend you do this. Have your server construct a list of transactions which need to be made and every so often an admin can login and review the list – if the transactions look ok they can manually supply the second password with a short timeout (don’t store the second password on your server if possible). When the admin provides a second password you can start a job to call sendmany.

Notes

  • An account is analogous for a label
  • A label and bitcoin address are interchangeable i.e. any command which you can supply a bitcoin address you can substitute a label and visa versa
  • Any parameters with default value e.g. (minConfirmations = 1) are optional
  • HTTP callbacks can be enabled in the notifications section of [Account Settings] in the web interface.

Host

The rpc host is rpc.******.****. Plain http and SSL https are supported.

Connecting using Florijncoind

Bitcoind can be used as an RPC client for testing and debugging.

$ ./florijncoin-cli -rpcconnect=rpc.****.**** -rpcport=443 -rpcssl -rpcuser=YourWalletIdentifier -rpcpassword=YourPassword getinfo

Wrapper Libraries

Shopping Cart Interfaces

Bitcoind Commands Not Available

  • getwork setgenerate getmininginfo getmemorypool Not intended for bitcoin mining
  • help Read this instead
  • keypoolrefill blockchain.info wallets have no keypool
  • stop
  • walletpassphrasechange Disabled for security reasons
  • dumpprivkey Disabled for security reasons
  • encryptwallet All blockchain.info wallets are encrypted by default. Password change is disabled for security reasons

Methods

  • Method: getinfo
  • Parameters: None
  • Description: Returns an object containing various state info.
  • Returns: JSONObject
{
    "balance" : 43.50100000,
    "errors" : "",
    "paytxfee" : 0.005,
    "proxy" : "",
    "connected" : 0,
    "testnet" : false,
    "difficulty" : 1733207.51384839,
    "blocks" : 179602
}
  • Method: walletlock
  • Parameters: None
  • Description: Remove second password from memory.
  • Returns: JSONObject
  • Method: settxfee
  • Parameters: (double amount)
  • Description: Sets the default transaction fee for 24 hours (must be called every 24 hours).
  • Returns: boolean
  • Method: walletpassphrase
  • Parameters: (String password, int timeout)
  • Description: Stores the wallet second password in cache for timeout in seconds. Only requred for double encrypted wallets.
  • Returns: boolean
  • Method: setaccount
  • Parameters: (String florijncoinAddress, String label)
  • Description: Set the label for a florijncoin address.
  • Returns: boolean
  • Method: getaccount
  • Parameters: (String florijncoinAddress)
  • Description: Get the label for a florijncoin address.
  • Returns: String
  • Method: getaccountaddress
  • Parameters: (String label)
  • Description: Get the first florijncoin address matching label.
  • Returns: String
  • Method: getaddressesbyaccount
  • Parameters: (String label)
  • Description: Get the an array of florijncoin addresses matching label.
  • Returns: JSONArray
  • Method: getbalance
  • Parameters: (String account = null, int minimumConfirmations = 1)
  • Description: If [account] is not specified, returns the server’s total available balance. If [account] is specified, returns the balance in the account.
  • Returns: JSONArray
0.001
  • Method: getblock
  • Parameters: (String blockHash)
  • Description: Returns information about the given block hash.
  • Returns: JSONObject
{
    "tx" : [
        "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b"
    ],
    "time" : 1231006505,
    "height" : 0,
    "nonce" : 2083236893,
    "hash" : "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f",
    "bits" : 486604799,
    "difficulty" : 1,
    "merkleroot" : "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b",
    "version" : 1,
    "size" : 285
}
  • Method: getblockcount
  • Parameters: None
  • Description: Returns the number of blocks in the longest block chain.
  • Returns: int
179729
  • Method: getblockhash
  • Alias: getblocknumber
  • Parameters: (blockHeight)
  • Description: Returns hash of block in best-block-chain at height.
  • Returns: String
000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
  • Method: getconnectioncount
  • Parameters: None
  • Description: Returns the number of connections to other nodes.
  • Returns: int
2000
  • Method: getdifficulty
  • Parameters: None
  • Description: Returns the proof-of-work difficulty as a multiple of the minimum difficulty.
  • Returns: double
  • Method: getgenerate
  • Parameters: None
  • Description: Returns true or false whether bitcoind is currently generating hashes.
  • Returns: boolean (false)
  • Method: gethashespersec
  • Parameters: None
  • Description: Returns a recent hashes per second performance measurement while generating.
  • Returns: int (0)
  • Method: getinfo
  • Parameters: None
  • Description: Returns an object containing various state info.
  • Returns: JSONObject
{
    "balance" : 43.29300000,
    "errors" : "",
    "paytxfee" : 0.005,
    "proxy" : "",
    "connected" : 3943,
    "testnet" : false,
    "difficulty" : 1733207.51384839,
    "blocks" : 179729
}
  • Method: gettransaction
  • Parameters: (String hash)
  • Description: Returns an object about the given transaction hash.
  • Returns: JSONObject
{
    "amount" : 0,
    "fee" : 0,
    "blockindex" : 179123,
    "details" : [
        {
            "fee" : 0,
            "amount" : 0.01000000,
            "blockindex" : 179123,
            "category" : "receive",
            "confirmations" : 0,
            "address" : "1APSgU92VV77GB2YMNNMMYz7Sock5gMgV1",
            "txid" : "5031738bc1f797e5e0f8b782989111d75106496c5dedea50d96e2ed1dc88190d",
            "block" : 1327599863,
            "blockhash" : "000000000000079bae4b877ad3810f03db249a6f239c2b69c18d44c141c470ee"
        },
        {
            "fee" : 0,
            "amount" : 0.00100000,
            "blockindex" : 179123,
            "category" : "receive",
            "confirmations" : 0,
            "address" : "15CDCKBLsvX3nZ3krMYNse6FkRcuMD1rmU",
            "txid" : "5031738bc1f797e5e0f8b782989111d75106496c5dedea50d96e2ed1dc88190d",
            "block" : 1327599863,
            "blockhash" : "000000000000079bae4b877ad3810f03db249a6f239c2b69c18d44c141c470ee"
        }
    ],
    "confirmations" : 15767,
    "txid" : "5031738bc1f797e5e0f8b782989111d75106496c5dedea50d96e2ed1dc88190d",
    "block" : 1327599863,
    "blockhash" : "000000000000079bae4b877ad3810f03db249a6f239c2b69c18d44c141c470ee"
}
  • Method: listaccounts
  • Parameters: (int confirmations = 1)
  • Description: Returns Object that has account names as keys, account balances as values.
  • Returns: JSONArray
{
    "1LjiSp75s24oBk5PkXVzNqCFr6ePcgv551" : 0,
    "1NW6nextdRXhKZWxLB4KaU6e9WjBQ1LVrW" : 0.2
}
  • Method: listreceivedbyaccount
  • Parameters: (int minConfirmations = 1, boolean includeempty = false)
  • Description: Returns an array of accounts with the total received and more info.
  • Returns: JSONArray
[
    {
        "amount" : 2558.40200000,
        "confirmations" : 55,
        "account" : "Savings",
        "label" : "Savings"
    }
]
  • Method: listreceivedbyaddress
  • Parameters: (int minConfirmations = 1, boolean includeempty = false)
  • Description: Returns an array of addresses with the the total received and more info.
  • Returns: JSONArray
[
    {
        "amount" : 255840224456,
        "confirmations" : 55,
        "address" : "145YPBBWRj4aquewvx59SAWNrSZFT5rvxr",
        "account" : "Savings"
    }
]
  • Method: listtransactions
  • Parameters: (String account = null, int count = 25, int offset = 0)
  • Description: Returns up to [count] most recent transactions skipping the first [from] transactions for account

[account]

. If [account] not provided will return recent transaction from all accounts. Returns: JSONArray

{
    "lastblock" : "00000000000009133d70c6282279bfc5fadfea07e27543445a199fe6ef84b51b",
    "transactions" : [
        {
            "fee" : 0.01000000,
            "amount" : 1,
            "blockindex" : 171984,
            "category" : "receive",
            "confirmations" : 0,
            "address" : "1A8JiWcwvpY7tAopUkSnGuEYHmzGYfZPiq",
            "txid" : "90992bc8ebff9774cfc91738863602010dab9ab2f5b0841cc4922786a2029725",
            "block" : 1323486876,
            "blockhash" : "00000000000003438e8c67500f34dd32bb1bf0d251a5c230c407641961c85b41",
            "account" : "My Wallet"
        }
    ]
}
  • Method: importprivkey
  • Parameters: (String privateKey)
  • Description: Import a private key into your bitcoin wallet. Private key must be in wallet import format (Sipa) beginning with a ‘5’.
  • Returns: boolean
  • Second Password Required
  • Method: move
  • Parameters: (String fromAccount, String toAccount, long amount)
  • Description: Move funds from one account in your wallet to another.
  • Returns: String
  • Second Password Required
608e3bf3113aa195b21dd52e5389693117e263458ef10b151ab73c91b815470a
  • Method: sendfrom
  • Parameters: (String fromAccount, String bitcoinAddress, long amount)
  • Description: amount is a real and is rounded to 8 decimal places. Will send the given amount to the given address, ensuring the account has a valid balance using [minconf] confirmations. Returns the transaction ID if successful (not in JSON object).
  • Returns: String
  • Second Password Required
608e3bf3113aa195b21dd52e5389693117e263458ef10b151ab73c91b815470a
  • Method: sendmany
  • Parameters: (String fromAccount, JSONObject addressAmountPairs)
  • Address Amount Pairs: {address:amount,…} e.g. {“1yeTWjh876opYp6R5VRj8rzkLFPE4dP3Uw”:10,”1yeTWjh876opYp6R5VRj8rzkLFPE4dP3Uw”:15}
  • Description: amounts are double-precision floating point numbers.
  • Returns: String
  • Second Password Required
608e3bf3113aa195b21dd52e5389693117e263458ef10b151ab73c91b815470a
  • Method: sendtoaddress
  • Parameters: (String florijncoinAddress, long amount)
  • Description: amount is a real and is rounded to 8 decimal places. Returns the transaction hash if successful. .
  • Returns: String
  • Second Password Required
608e3bf3113aa195b21dd52e5389693117e263458ef10b151ab73c91b815470a
  • Method: validateaddress
  • Parameters: (String florijncoinAddress)
  • Description: Return information about bitcoinaddress.
  • Returns: JSONObject
  • Second Password Required
{
    "address" : "1BZZnJG6q95aJqPZweSCGnno2rxcXyfaLo",
    "iscompressed" : false,
    "account" : "Test",
    "pubkey" : "04572e60ecaa1dd7cb435dc8e04bb6c1729d69bb3916e3f4849b3ffcb02f01f5d94a03c266507245ff30c04dee99ceb711050003b6282ea72634d8f610878885e6",
    "ismine" : true,
    "isvalid" : true
}
  • Method: getnewaddress
  • Parameters: (String label = null)
  • Description: Returns a new bitcoin address for receiving payments. If [account] is specified (recommended), it is added to the address book so payments received with the address will be credited to [account].
  • Returns: String
  • Second Password Required
1BZZnJG6q95aJqPZweSCGnno2rxcXyfaLo
  • Method: signmessage
  • Parameters: (String florijncoinaddress, String message)
  • Description: Returns a Base64 encoded signature used to verify the provided message was signed by the owner of bitcoinaddress
  • Returns: String
  • Second Password Required
GyLL9ps957O7gLGEWH4Q42WVDADXeHWeLhAQQIsI5m0pjGVDuEJLnK5RgI/7TwPU4UCzwo2BDVXyadBAMW0JKgc=
  • Method: verifymessage
  • Parameters: (String florijncoinaddress, String signature, String message)
  • Description: Verifies the signature and message matches the florijncoin address provided (See signmessage)
  • Returns: Boolean
true