Skip to content

Commit

Permalink
add basic-api, cold-receiving and hot-sending-api result example
Browse files Browse the repository at this point in the history
  • Loading branch information
zhumingu committed Aug 2, 2016
1 parent e469fec commit cfff4df
Show file tree
Hide file tree
Showing 3 changed files with 149 additions and 22 deletions.
128 changes: 110 additions & 18 deletions source/api/basic-api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Time
**Example response**::

{
"time": "2016-08-02T12:51:34.460394"
}

User
Expand All @@ -28,18 +29,18 @@ User
**Example response**::

{
"can_otc_ad": 0,
"user_id": 40000,
"gender": 0,
"user_type": 4,
"real_name": null,
"receiving_index": 1,
"avatar": null,
"register_at": "2016-07-11T14:19:55",
"address": "1Mzvo2UkBnEpQC8xkui23mYQQeL8NREqrJ",
"balance": 60000,
"user_name": "bitpie-hot-40000",
"can_otc_order": 0
"can_otc_ad": 0,
"user_id": 40000,
"gender": 0,
"user_type": 4,
"real_name": null,
"receiving_index": 1,
"avatar": null,
"register_at": "2016-07-11T14:19:55",
"address": "1Mzvo2UkBnEpQC8xkui23mYQQeL8NREqrJ",
"balance": 60000,
"user_name": "bitpie-hot-40000",
"can_otc_order": 0
}

Address Batch
Expand All @@ -51,8 +52,33 @@ Address Batch

**Example response**::

{
}
[
{
"index": 0,
"address": "1B4qK6KTzWCnbNcx4WDYR99KfVRsU2zDcN"
},
{
"index": 1,
"address": "1Mzvo2UkBnEpQC8xkui23mYQQeL8NREqrJ"
},
{
"index": 2,
"address": "1n566cWbw6c3KLBJ8X1vvo8vi4G8BMmEV"
},
...
{
"index": 997,
"address": "1Hc6MffGiYPLJdwAnR42JpTYdGonfWEJ7N"
},
{
"index": 998,
"address": "1KqPMBXtmvKkLe9TCHzVR4New3c5xkVgge"
},
{
"index": 999,
"address": "1BN69Mnr48BDVgwXV7cKBBsCJ2iB6EHxUa"
}
]

**Parameters**:
* ``batch_no`` *(required)* *(int)* - batch no.
Expand All @@ -68,8 +94,20 @@ Address History

**Example response**::

{
}
[
{
"index": 2,
"address": "1P4HA6XFs1j8S9FZtakhbCrT8JcZzWwH9h"
},
{
"index": 1,
"address": "1F1BnSuNwidFvmBmCHcqiWGePkzBfBTtgF"
},
{
"index": 0,
"address": "15qbwdkwUzUkk3PQ7HVSwJXJfNashY51S2"
}
]

**Parameters**:
* ``path`` *(required)* *(int)* - path for receiving or change addresses.
Expand All @@ -86,6 +124,8 @@ Address Next
**Example response**::

{
"index": 1
"address": "1Mzvo2UkBnEpQC8xkui23mYQQeL8NREqrJ"
}

Tx List
Expand All @@ -97,8 +137,29 @@ Tx List

**Example response**::

{
}
[
{
"tx_hash": "a8e4f0a01a89c6335369b70d8272133164c0d29f91ac9eceddee708eb77347b1",
"tx_at": "2016-07-27T09:07:39",
"confirm_at": "2016-07-27T09:55:47",
"confirmation": 869,
"value": -20000
},
{
"tx_hash": "50369615dac8c30ac629d567bac457de59c8aa39946856bf79269b92c83478c0",
"tx_at": "2016-07-27T05:48:11",
"confirm_at": "2016-07-27T05:22:22",
"confirmation": 891,
"value": 90000
},
{
"tx_hash": "1c56ac562ad216f3fe68e8142a7f28f4889886065cc77745af4c9ddaee17c6e1",
"tx_at": "2016-07-27T02:21:53",
"confirm_at": "2016-07-27T02:31:34",
"confirmation": 908,
"value": 10000
}
]

**Arguments**:
* ``tx_hash`` *(optional)* *(str)* - from which tx_hash to retrieve txs.
Expand All @@ -115,6 +176,37 @@ Tx Detail
**Example response**::

{
"tx_hash": "1c56ac562ad216f3fe68e8142a7f28f4889886065cc77745af4c9ddaee17c6e1",
"inputs": [
{
"is_mine": false,
"value": 2510000,
"prev_out_sn": 1,
"sn": 0,
"address": "19EbsdkWfihtQHn4CoN5Eoyzh7cqqPNSLR",
"prev_tx_hash": "6aac1207ced737dc5a576dc5812a1c38687a760e2e148e6e6b1f12c1bf121dc0"
}
],
"confirmation": 908,
"outputs": [
{
"status": 1,
"is_mine": true,
"sn": 0,
"value": 10000,
"address": "1B4qK6KTzWCnbNcx4WDYR99KfVRsU2zDcN"
},
{
"status": 1,
"is_mine": false,
"sn": 1,
"value": 2490000,
"address": "1BU1p3PU9MRcPrvggBmDEXokigZy5cxQso"
}
],
"confirm_at": "2016-07-27T02:31:34",
"value": 10000,
"tx_at": "2016-07-27T02:21:53"
}

**Parameters**:
Expand Down
26 changes: 23 additions & 3 deletions source/api/cold-receiving-api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,31 @@ Address Txs

**Example response**::

{
}
[
{
"tx_hash": "a8e4f0a01a89c6335369b70d8272133164c0d29f91ac9eceddee708eb77347b1",
"tx_at": "2016-07-27T09:07:39",
"confirm_at": "2016-07-27T09:55:47",
"confirmation": 869,
"value": -20000
},
{
"tx_hash": "50369615dac8c30ac629d567bac457de59c8aa39946856bf79269b92c83478c0",
"tx_at": "2016-07-27T05:48:11",
"confirm_at": "2016-07-27T05:22:22",
"confirmation": 891,
"value": 90000
},
{
"tx_hash": "1c56ac562ad216f3fe68e8142a7f28f4889886065cc77745af4c9ddaee17c6e1",
"tx_at": "2016-07-27T02:21:53",
"confirm_at": "2016-07-27T02:31:34",
"confirmation": 908,
"value": 10000
}
]

**Parameters**:
* ``address`` *(required)* *(str)* - specific address.

.. note:: You can use this API to monitoring all your Cold Receiving addresses.

17 changes: 16 additions & 1 deletion source/api/hot-sending-api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Hot Sending Tx Request
**Example response**::

{
"result": true
}

Hot Sending Tx Detail
Expand All @@ -26,10 +27,24 @@ Hot Sending Tx Detail
**Example response**::

{
"tx_hash": "897a7eb61ea4e9b5a72afa95573ccdc67d4edb3984509a11316664cb69a18065",
"c_id": 2,
"user_id": 40000,
"send_request": {
"coin_code": "BTC",
"user_tx_no": "8",
"is_dynamic_fee": 1,
"value": 10000,
"address": "1NbbvxBYxGGCBhaM8mow1HFWA7dB5yukmY"
},
"vc_code": "HxAK9Q4CdcKzypai9Wk4gjYwC8jeuHq9UWunAvyzRbO1a4PyZecmYF0WS5kdtBH80/0EtSETjurHyRctkCFsxVk=",
"request_at": "2016-07-31T04:52:13",
"hot_wallet_tx_id": 26,
"tx_at": "2016-07-31T05:31:07",
"hot_wallet_tx_status": 1
}

**Parameters**:
* ``user_tx_no`` *(required)* *(int)* - for which user_tx_no to retrieve tx detail.

.. note:: user_tx_no is the unique transaction id in your own system, you should use an auto incremented primary key as user_tx_no.

0 comments on commit cfff4df

Please sign in to comment.