Bitkeep中心化钱包

来自BitKeep_Wiki
跳转至: 导航搜索

初始化账户[编辑]

请求[编辑]

   curl -X POST \
   http://dev.bitkeep.com:20001/bcloud/accountInit \
   -H 'apiversion: 0.1' \
   -H 'appid: acX4if6P8KNVytLOgkEuD1IH9A2ZUrRx' \
   -H 'appuserid: 10769' \
   -H 'cache-control: no-cache' \
   -H 'content-type: application/json' \
   -H 'currency: cny' \
   -H 'language: cn' \
   -H 'postman-token: d2ce374b-980e-6bcf-a505-ef62eb0e54a9' \
   -d '{}'


返回[编辑]

   {
       "status": 0,
       "msg": "",
       "data": true
   }


货币列表[编辑]

请求[编辑]

   curl -X POST \
   http://dev.bitkeep.com:20001/bcloud/getCoins \
   -H 'apiversion: 0.1' \
   -H 'appid: acX4if6P8KNVytLOgkEuD1IH9A2ZUrRx' \
   -H 'appuserid: 10769' \
   -H 'cache-control: no-cache' \
   -H 'content-type: application/json' \
   -H 'currency: cny' \
   -H 'language: cn' \
   -H 'postman-token: 41260f5a-74bf-2de9-cded-412f4f36bb13' \
   -d '{"userId":10769}'


返回[编辑]

   {
       "status": 0,
       "msg": "",
       "data": {
           "total": 3,
           "items": [
               {
                   "name": "Bitcoin",
                   "coin": "BTC",
                   "icon": "http://open.naodui.com/icons/b/btc.png",
                   "amount": "0.00000000",
                   "price": "0.00",
                   "ticker": "23769.32",
                   "margin": "0.00",
                   "address": "1Q89PwWpR8yNLpkbBKgAbspf8aQCFXYbz5",
                   "sort": 100
               },
               {
                   "name": "Ethereum",
                   "coin": "ETH",
                   "icon": "http://open.naodui.com/icons/e/eth.png",
                   "amount": "0.00000000",
                   "price": "0.00",
                   "ticker": "594.27",
                   "margin": "0.00",
                   "address": "0xd5dCc2286631E43EeBfd28b430cEfDc4557D702e",
                   "sort": 100
               },
               {
                   "name": "SmartMesh",
                   "coin": "SMT",
                   "icon": "http://open.naodui.com/icons/eth_default.png",
                   "amount": "0.00000000",
                   "price": "0.00",
                   "ticker": "0.14",
                   "margin": "0.00",
                   "address": "0xd5dCc2286631E43EeBfd28b430cEfDc4557D702e",
                   "sort": 100
               }
           ]
       }
   }



添加货币[编辑]

请求[编辑]

   curl -X POST \
   http://dev.bitkeep.com:20001/bcloud/addCoin \
   -H 'apiversion: 0.1' \
   -H 'appid: acX4if6P8KNVytLOgkEuD1IH9A2ZUrRx' \
   -H 'appuserid: 10769' \
   -H 'cache-control: no-cache' \
   -H 'content-type: application/json' \
   -H 'currency: cny' \
   -H 'language: cn' \
   -H 'postman-token: a29dc0b2-fdce-17d0-0a7d-a942298a5f0c' \
   -d '{"coin":"OMG"}'


返回[编辑]

   {
       "status": 0,
       "msg": "",
       "data": true
   }


移除货币(废弃)[编辑]

请求[编辑]

   curl -X POST \
   http://dev.bitkeep.com:20001/bcloud/removeCoin \
   -H 'apiversion: 0.1' \
   -H 'appid: acX4if6P8KNVytLOgkEuD1IH9A2ZUrRx' \
   -H 'appuserid: 10769' \
   -H 'cache-control: no-cache' \
   -H 'content-type: application/json' \
   -H 'currency: cny' \
   -H 'language: cn' \
   -H 'postman-token: a29dc0b2-fdce-17d0-0a7d-a942298a5f0c' \
   -d '{
       "coin":"OMG"
   }'


返回[编辑]

   {
       "status": 0,
       "msg": "",
       "data": true
   }


转账[编辑]

请求[编辑]

   curl -X POST \
   http://dev.bitkeep.com:20001/bcloud/createUserTransfer \
   -H 'apiversion: 0.1' \
   -H 'appid: acX4if6P8KNVytLOgkEuD1IH9A2ZUrRx' \
   -H 'appuserid: 10769' \
   -H 'cache-control: no-cache' \
   -H 'content-type: application/json' \
   -H 'currency: cny' \
   -H 'language: cn' \
   -H 'postman-token: 9effedb5-02f9-bda3-fe39-36b2f0164593' \
   -d '{
       "feeCoin":"0",
       "feeAmount": 0,
       "coin": "BTC",
       "fromUserId": "10769",
       "toUserId": "10111",
       "amount": 1}'


返回[编辑]

   {
       "status": 0,
       "msg": "",
       "data": {
       }
   }




提现转账[编辑]

请求[编辑]

   curl -X POST \
   http://dev.bitkeep.com:20001/bcloud/createUserTransfer \
   -H 'apiversion: 0.1' \
   -H 'appid: acX4if6P8KNVytLOgkEuD1IH9A2ZUrRx' \
   -H 'appuserid: 10769' \
   -H 'cache-control: no-cache' \
   -H 'content-type: application/json' \
   -H 'currency: cny' \
   -H 'language: cn' \
   -H 'postman-token: 9effedb5-02f9-bda3-fe39-36b2f0164593' \
   -d '{
           "feeCoin":"0",
           "feeAmount": 0,
           "coin": "BTC",
           "fromUserId": "10769",
           "toAddress": "1AEHme2G7TfWZp6LRJaziN7RdjrMdrX9VQ",
           "amount": 1
   }'


返回[编辑]

   {
       "status": 0,
       "msg": "",
       "data": {
       }
   }




从冻结转账[编辑]

请求[编辑]

   curl -X POST \
   http://dev.bitkeep.com:20001/bcloud/createUserTransfer \
   -H 'apiversion: 0.1' \
   -H 'appid: acX4if6P8KNVytLOgkEuD1IH9A2ZUrRx' \
   -H 'appuserid: 10769' \
   -H 'cache-control: no-cache' \
   -H 'content-type: application/json' \
   -H 'currency: cny' \
   -H 'language: cn' \
   -H 'postman-token: 9effedb5-02f9-bda3-fe39-36b2f0164593' \
   -d '{
           "feeCoin":"0",
           "feeAmount": 0,
           "appId":"1",
           "businessId":12,
           "coin": "BTC",
           "fromUserId": "10769",
           "toUserId": "10111",
           "amount": 0.01
   }'


返回[编辑]

   {
       "status": 0,
       "msg": "",
       "data": {
       }
   }





冻结资产[编辑]

请求[编辑]

   curl -X POST \
   http://dev.bitkeep.com:20001/wallet/freeze \
   -H 'apiversion: 0.1' \
   -H 'appid: acX4if6P8KNVytLOgkEuD1IH9A2ZUrRx' \
   -H 'appuserid: 10769' \
   -H 'cache-control: no-cache' \
   -H 'content-type: application/json' \
   -H 'currency: cny' \
   -H 'language: cn' \
   -H 'postman-token: 57344f19-88e0-5bd1-f456-38a052d340bf' \
   -d '{
       "userId":"10769",
       "coin":"btc",
       "amount":1,
       "appId":"1",
       "businessId":"112",
       "note":"test"
   }'


返回[编辑]

   {
       "status": 0,
       "msg": "",
       "data": true
   }



解冻资产[编辑]

请求[编辑]

   curl -X POST \
   http://dev.bitkeep.com:20001/wallet/unfreeze \
   -H 'apiversion: 0.1' \
   -H 'appid: acX4if6P8KNVytLOgkEuD1IH9A2ZUrRx' \
   -H 'appuserid: 10769' \
   -H 'cache-control: no-cache' \
   -H 'content-type: application/json' \
   -H 'currency: cny' \
   -H 'language: cn' \
   -H 'postman-token: 57344f19-88e0-5bd1-f456-38a052d340bf' \
   -d '{
       "userId":"10769",
       "coin":"btc",
       "amount":1,
       "appId":"1",
       "businessId":"112",
       "note":"test"
   }'


返回[编辑]

   {
       "status": 0,
       "msg": "",
       "data": true
   }



资产列表[编辑]

请求[编辑]

   curl -X POST \
   http://dev.bitkeep.com:20001/wallet/list \
   -H 'apiversion: 0.1' \
   -H 'appid: acX4if6P8KNVytLOgkEuD1IH9A2ZUrRx' \
   -H 'appuserid: 10769' \
   -H 'cache-control: no-cache' \
   -H 'content-type: application/json' \
   -H 'currency: cny' \
   -H 'language: cn' \
   -H 'postman-token: 70058412-aef5-cc56-3da0-7cbe2c32f477' \
   -d '{"userId":"10769"}'

返回[编辑]

   {
       "status": 0,
       "msg": "",
       "data": [
           {
               "coin": "BTC",
               "amount": "138.26760037",
               "address": "0xd5dCc2286631E43EeBfd28b430cEfDc4557D702e",
               "freeze": "10.13000000",
               "createdAt": 1545387247
           },
           {
               "coin": "ETH",
               "amount": "8.00000000",
               "address": "0xd5dCc2286631E43EeBfd28b430cEfDc4557D702e",
               "freeze": "0.00000000",
               "createdAt": 1545793425
           }
       ]
   }



资产总额[编辑]

请求[编辑]

   curl -X POST \
   http://dev.bitkeep.com:20001/wallet/total \
   -H 'apiversion: 0.1' \
   -H 'appid: acX4if6P8KNVytLOgkEuD1IH9A2ZUrRx' \
   -H 'appuserid: 10769' \
   -H 'cache-control: no-cache' \
   -H 'content-type: application/json' \
   -H 'currency: cny' \
   -H 'language: cn' \
   -H 'postman-token: 70058412-aef5-cc56-3da0-7cbe2c32f477' \
   -d '{"userId":"10769"}'

返回[编辑]

   {"status":0,"msg":"","data":{"userId":"10769","items":[{"currency":"CNY","values":"2980796.17387738"},{"currency":"USD","values":"428860.74422532"},{"currency":"BTC","values":"125.40521206"}]}}



充值记录[编辑]

请求[编辑]

   curl -X POST \
   http://dev.bitkeep.com:20001/wallet/deposits \
   -H 'apiversion: 0.1' \
   -H 'appid: acX4if6P8KNVytLOgkEuD1IH9A2ZUrRx' \
   -H 'appuserid: 10769' \
   -H 'cache-control: no-cache' \
   -H 'content-type: application/json' \
   -H 'currency: cny' \
   -H 'language: cn' \
   -H 'postman-token: 28f49de1-2803-b1bf-c00f-4f257207dba6' \
   -d '{"userId":"10769"}'


返回[编辑]

   {
       "status": 0,
       "msg": "",
       "data": [
           {
               "id": 2,
               "appId": "9aaqlpy7xstgcm4jzwdfkenjfcmrgxez",
               "userId": 10769,
               "txid": "yruyreuiyrewiuyreirewyui1",
               "coin": "BTC",
               "amount": "11.10000009",
               "feeUsed": "0.00000000",
               "fromUserId": 0,
               "toUserId": 0,
               "fromAddress": "12Diy4fd5NYM7uJesxRJza7BMtzx73eryG",
               "toAddress": "1Ga5JDbFbQmRRiUYWbjBwKvXkquhtHW4YB",
               "note": null,
               "status": "success",
               "type": "in",
               "createdAt": 1545799334,
               "updatedAt": 1545799334
           },
           {
               "id": 1,
               "appId": "9aaqlpy7xstgcm4jzwdfkenjfcmrgxez",
               "userId": 10769,
               "txid": "yruyreuiyrewiuyreirewyui",
               "coin": "BTC",
               "amount": "11.10000009",
               "feeUsed": "0.00000000",
               "fromUserId": 0,
               "toUserId": 0,
               "fromAddress": "12Diy4fd5NYM7uJesxRJza7BMtzx73eryG",
               "toAddress": "1Ga5JDbFbQmRRiUYWbjBwKvXkquhtHW4YB",
               "note": null,
               "status": "success",
               "type": "in",
               "createdAt": 1545799140,
               "updatedAt": 1545799140
           }
       ]
   }


提现记录[编辑]

请求[编辑]

   curl -X POST \
   http://dev.bitkeep.com:20001/wallet/withdrawals \
   -H 'apiversion: 0.1' \
   -H 'appid: acX4if6P8KNVytLOgkEuD1IH9A2ZUrRx' \
   -H 'appuserid: 10769' \
   -H 'cache-control: no-cache' \
   -H 'content-type: application/json' \
   -H 'currency: cny' \
   -H 'language: cn' \
   -H 'postman-token: 28f49de1-2803-b1bf-c00f-4f257207dba6' \
   -d '{"userId":"10769"}'


返回[编辑]

   {"status":0,"msg":"","data":[{"id":42,"appId":"acx4if6p8knvytlogkeud1ih9a2zurrx","userId":10769,"txid":"pending_419629ae4caa5ecc02576ecd64db7e2162ee53fb7d7bdab2ba307da6a04cfa35","coin":"BTC","amount":"0.01000000","feeUsed":"0.00010000","fromUserId":10769,"toUserId":10111,"fromAddress":"","toAddress":"","note":"","status":"success","type":"out","createdAt":1545900354,"updatedAt":1545900354}]}