This commit is contained in:
progr76@gmail.com
2019-02-18 16:29:55 +03:00
parent 5affe69fe0
commit 38de781bd4
14 changed files with 343 additions and 46 deletions

View File

@@ -1,5 +1,5 @@
# API v2 (for exchanges)
Works with update version 0.895
The API is designed to make it easier to write third-party applications. Server-side cryptography and POW operations are performed. Therefore, it is not recommended for public access, because it is not protected from DDOS attacks. Use it if applications such as the exchange server are on the same private network.
@@ -223,7 +223,74 @@ return:
6)**/api/v2/GetHistoryTransactions** - to get the transaction history of the account
#### **TODO**
#### Parameters:
* AccountID - account (account) number)
* Count - maximum number of rows returned - history depth (default 100)
option to set parameters for organizing page navigation:
* NextPos - history line ID number (this value is taken from the last line of the previous result)
* Count - number of rows returned
Advanced setting:
* GetTxID - if set to 1, the transaction ID in hex-format is returned in the TxID field
example1:
```js
http://127.0.0.1/api/v2/GetHistoryTransactions
{
"AccountID": 190480
}
```
return:
```js
{
"result": 1,
"History": [
{
"Type": 1,
"BlockNum": 19994502,
"TrNum": 0,
"Pos": 498190,
"NextPos": 439090,
"Direct": "+",
"CorrID": 190478,
"SumCOIN": 1,
"SumCENT": 0
},
{
"Type": 1,
"BlockNum": 19993514,
"TrNum": 0,
"Pos": 439090,
"NextPos": 0,
"Direct": "+",
"CorrID": 190478,
"SumCOIN": 1,
"SumCENT": 0
}
],
"Tail": {
"NextPos": 498190,
"Reserv": {
"type": "Buffer",
"data": [
0,
0
]
},
"Num": 190480
}
}
```
example2:
```js
http://127.0.0.1/api/v2/GetHistoryTransactions
{
"NextPos": 439090
}
```