OScore Open API
OScore API reference
OScore is a digital asset score that is calculated based on the assigned to each wallet account on the Ontology chain. The score can be queried by sending requests to the following public APIs.
Request Particulars
The
timestamp
sent in the request is only valid for 30 seconds. In case this threshold is exceeded the error code62020
will be sent in the response.The request needs to be signed by the respective ONT ID. The back end carries out signature verification. If verification fails, the
62006
error code will be sent in response.The ONT ID and timestamp are concatenated together to obtain the signature content. The signature is a
base64
string. For example, foront_id=did:ont:AaRxdnJA5mArpFr1CA7RhT9AYrXdRgNqWm
andtimestamp=1596164819
, the ONT ID's private key is used to sign the signature data and generate the base64 string. The data to be signed isdid:ont:AaRxdnJA5mArpFr1CA7RhT9AYrXdRgNqWm1596164819
The base URL used to send the requests is https://service.onto.app/S5
Fetch User's Asset Score
This method can be used to fetch a user's asset score by passing the ONT ID.
Method: POST
URL: /v2/ontoservice/asset_score
Request:
Response:
Fetch User's Asset Score Details
This method can be used to fetch details regarding a user's asset score by passing the ONT ID.
Method: POST
URL: /v2/ontoservice/asset_score/detail
Request:
Response:
Field
Type
Description
snapshot_asset_avg_usd
String
Daily average asset value for all accounts in USD
asset_usd
String
Current asset value in USD
exchange_asset_usd
String
Total assets in exchange wallet accounts in USD
Last updated