The REST API to help with some dApp features.
The API is available on api.thalesmarket.io.
- Node.js
- Express
- Redis
- thales-data
npm i
npm run dev
Runs the API in the development mode on http://localhost:3002.
The following endpoints are available:
- GET /token/price
- GET /token/circulatingsupply
- GET /token/marketcap
- GET /token/totalsupply
- GET /parlay-leaderboard/[networkId]/[period]
Get current THALES price.
Example: https://api.thalesmarket.io/token/price
Response body:
0.52
Get current THALES circulating supply.
Example: https://api.thalesmarket.io/token/circulatingsupply
Response body:
44589461
Get current THALES market cap.
Example: https://api.thalesmarket.io/token/marketcap
Response body:
21287365
Get current THALES total supply.
Example: https://api.thalesmarket.io/token/totalsupply
Response body:
99091000
Get parlay leaderboard for requested network and period.
Example: https://api.thalesmarket.io/parlay-leaderboard/10/1
Response :
[
{
"id":"0x13a71c494d76c551934e3379929b8371634a8c26",
"txHash":"0x99a52d8d3c07e5ce58a861a7ed29f419352c130c158ea",
"sportMarkets":[
...
],
"sportMarketsFromContract":[
...
],
"positions":[
...
],
"positionsFromContract":[
...
],
"marketQuotes":[
...
],
"account":"0x04433729c268aa34abb4d2a9da924ee81717bdae",
"totalAmount":304,
"sUSDPaid":8,
"sUSDAfterFees":7.6,
"totalQuote":0.025,
"skewImpact":0.16,
"timestamp":1679857157000,
"lastGameStarts":1679871600000,
"blockNumber":"83890766",
"claimed":true,
"won":true,
"numberOfPositions":8,
"rank":1
}
]