Skip to content
BuRNiNBoNeS edited this page Apr 22, 2017 · 4 revisions

Base URL

/api.php?

Your API key is the same as your Google Authenticator Secret. You must enable Two Factor Authentication to use API.

Account

  • Method:

GET

  • URL Params

Required:

key=[string]&action=getaccount

  • Success Response:

    • Code: 200 Content: {"success":true,"message":"","result":{"id":"1","username":"piWallet","balance":"12345","addresses":["array", "of", "addresses"],"Support Pin":"12345","admin":"1"}} Error Response:
  • Code: 401 UNAUTHORIZED Content: {"success":false,"message":"API Key invalid","result":"error"}

Addresses

  • Method:

GET

  • URL Params

Required:

key=[string]&action=getaddresses

  • Success Response:

    • Code: 200 Content: {"success":true,"message":"","result":{"addressses":["array", "of", "addresses"]}}

Error Response:

  • Code: 401 UNAUTHORIZED Content: {"success":false,"message":"API Key invalid","result":"error"}

Transactions

  • Method:

GET

  • URL Params

Required:

key=[string]&action=gettransactions

  • Success Response:

    • Code: 200 Content: {"success":true,"message":"","result":{"transactions":[{"account":"piWallet","address":"RKrDgrymPLns1B8xUSGYHUMjcusgabobCN","category":"receive","amount":11,"confirmations":83931,"blockhash":"281ad1e8a9303937ccff47b6d79dcba710a5df19d227049e45d68b175eac689e","blockindex":2,"blocktime":1489519304,"txid":"4922c8be4d31518aa314e2a88e3b01a13e967bada1a16560c5f60a0a27accbd8","time":1489519220,"timereceived":1489519220}]}}

Error Response:

  • Code: 401 UNAUTHORIZED Content: {"success":false,"message":"API Key invalid","result":"error"}

Balance

  • Method:

GET

  • URL Params

Required:

key=[string]&action=getbalance

  • Success Response:

    • Code: 200 Content: {"success":true,"message":"","result":{"balance":""}}

Error Response:

  • Code: 401 UNAUTHORIZED Content: {"success":false,"message":"API Key invalid","result":"error"}

New Address

  • Method:

GET

  • URL Params

Required:

key=[string]&action=getnewaddress

  • Success Response:

    • Code: 200 Content: {"success":true,"message":"","result":{"address":"RPyBgiPcx2hHv1Jy6mZWyay4A47kg8skWK"}}

Error Response:

  • Code: 401 UNAUTHORIZED Content: {"success":false,"message":"API Key invalid","result":"error"}

Withdraw

  • Method:

POST

  • URL Params

Required:

key=[string]&action=withdraw&address=[withdrawalAddress]&amount=[amountToWithdraw]

  • Success Response:

    • Code: 200 Content: {"success":true,"message":"Withdrawal successful","result":""}

Error Response:

  • Code: 401 UNAUTHORIZED Content: {"success":false,"message":"Withdrawals Disabled!","result":"error"}

#Either withdrawal address is missing or amount is missing

  • Code: 401 UNAUTHORIZED Content: {"success":false,"message":"You have to provide all the values!","result":"error"}

  • Code: 401 UNAUTHORIZED Content: {"success":false,"message":"Withdrawal amount exceeds your wallet balance","result":"error"}

#verbose withdrawal error

  • Code: 401 UNAUTHORIZED Content: {"success":false,"message":"","result":"error"}

  • Code: 401 UNAUTHORIZED Content: {"success":false,"message":"API Key invalid","result":"error"}

Other Errors

  • Code: 401 UNAUTHORIZED Content: {"success":false,"message":"You MUST provide an API key","result":"error"}

  • Code: 401 UNAUTHORIZED Content: {"success":false,"message":"No Action provided","result":"error"}

  • Code: 401 UNAUTHORIZED Content: {"success":false,"message":"Unknown Action!","result":"error"}

Clone this wiki locally