SymScan API
SangHyun Lee edited this page Nov 21, 2019
·
6 revisions
- API requests a unique value generated in the device from User-Agent
{PlatformDefault} {OS} {AppName}/{AppVersion} ({UUID}+{Random 8Byte Characters})
- OS is the platform name of the current device.
- AppName and AppVersion are the name and version of the app currently using the API.
- UUID uses a randomly generated UUID.
- Random 8-byte string uses a randomly generated string.
- UUID + Random string is saved in the device and used repeatedly.
- Since API Service does not use the value of the private key to identify the user, you can use the separate generated value (app instance tracking) for the continuity of the API service. (Not currently available)
- API URL https://api.symverse.com
POST https://{API_URL}/scan/gettransaction
Path
- null
Parameters
- null
Request Header
Key | Type | Value |
---|---|---|
content-type | String | application/json;charset=utf8 |
user-agent | String | {PlatformDefault} {OS} {AppName}/{AppVersion} ({UUID}+{Random 8Byte Characters}) Ex. Mozilla/5.0 (Linux; Android 9; LM-G710N Build/PKQ1.181105.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.92 Mobile Safari/537.36 Android SymWallet/0.0.1 (2c09b086-a1c0-469b-bc5b-ecc538c08fd0+zqq24hPc) |
Payload
Key | Type | Value |
---|---|---|
check_token | String | Use API Sequence call Initialization : 0000 |
pcmd | String | 0 : Search by the number of pcnts from the most recent D : Search for the previous one from pnumidx U : Search for the next one from pnumidx |
pcnt | String | Request amount |
pnum | String | The number of the item to start searching |
pnumidx | String | Index of the item to start searching |
ptype | String | Get sent and received records of SymID. A : All T : To F : From |
SymID | String | SymID with 0x |
v_app_code | String | Application Version Code |
v_app_os | String | AOS, IOS |
v_app_version | String | Application Version Name |
v_country_code | String | ISO two-letter country code |
v_device_code | String | {UUID}+{Random 8Byte Characters} added to User-agent |
{
"check_token": "",
"pcmd": "0",
"pcnt": "20",
"pnum": "4099285",
"pnumidx": "0",
"ptype": "A",
"SymID": "0x00025ba7bc8d9c870002",
"v_app_code": "1",
"v_app_os": "AOS",
"v_app_version": "0.0.1",
"v_country_code": "KR",
"v_device_code": "2c09b086-a1c0-469b-bc5b-ecc538c08fd0+zqq24hPc"
}
Response Payload
Key | Type | Value |
---|---|---|
transactions | Object Array | |
: blockHash | Hex String | Block hash |
: temp | long | Temporary blockNumber |
: transactionIndex | Hex String | Tx Index |
: type | Hex String | Tx Type |
: nonce | Hex String | Tx nonce |
: workNodes | String Array | WorkNode SymID Array |
: input | Hex String | Tx Input Data |
: data_create | Hex String | Tx Timestamp |
: blockNumber | long | BlockNumber |
: from | Hex String | From(Sender) |
: to | Hex String | To(Receiver) |
: value | Hex String | Tx Send Amount |
: gas | Hex String | Gas |
: gasPrice | Hex String | Gas Price |
: seq | long | Sequence |
: hash | Hex String | Tx Hash |
: v | Hex String | v |
: r | Hex String | r |
: s | Hex String | s |
{
"transactions": [
{
"blockHash": "0xa0ebd43a9b3853c76a2f846f12efb72945fd29b6834c891950338ce3363c6637",
"temp": 4088521,
"transactionIndex": "0x0",
"type": "0x0",
"nonce": "0x0",
"workNodes": "[]",
"input": "0x0",
"r": "0x0",
"s": "0x0",
"date_create": "0x5d91a218",
"v": "0x0",
"blockNumber": 4088521,
"gas": "0x0",
"from": "0x00010000000000020002",
"to": "0x00025ba7bc8d9c870002",
"value": "0x1a675944a9a107b9",
"seq": 1114366,
"hash": "0x0",
"gasPrice": "0x5d21dba00"
},
...
]
}