docker build . -t cached
docker run -p 3001:3001 cached
## One command to build and run with docker-compose
docker-compose -f docker-compose-staging.yml up --build
params: address=0x2262d4f6312805851e3b27c40db2c7282e6e4a42
return user stats infoparams: ?source=TUSD&dest=ETH&destAmount=500
calculate and return relative src amount when having dest amount/cacheVersion: return current cache version
/latestBlock
(GET) Return latest block number of network
Response:
{
"data": "4790885",
"success": true
}
/rateUSD
(GET) Return USD price of token base on it's expectedRate
Response:
{
"data": [
{
"symbol": "ETH",
"price_usd": "150.110255"
}
],
"success": true
}
/rate
(GET) Return rate of token with eth (expectedRate and minRate)
Response:
{
"data": [
{
"source": "POWR",
"dest": "ETH",
"rate": "580350000000000",
"minRate": "562939500000000"
},
{
"source": "REQ",
"dest": "ETH",
"rate": "251549999999999",
"minRate": "244003499999999"
}
],
"success": true
}
/kyberEnabled
(GET) Return kyberEnabled from contract
Response:
{
"data": true,
"success": true
}
/maxGasPrice
(GET) Return max GasPrice from contract
Response:
{
"data": "50000000000",
"success": true
}
/gasPrice
(GET) Return gasPrice get from https://ethgasstation.info/
Response:
{
"data": {
"fast": "10",
"standard": "5.55",
"low": "1.1",
"default": "5.55"
},
"success": true
}
/rateETH
(GET) Return USD price of ETH from Coingecko
Response:
{
"data": "150.480634",
"success": true
}
/cacheVersion
(GET) Return current cache version
Response:
{
"data": "14:40:42 09-01-2019",
"success": true
}
/users?address=0x2262d4f6312805851e3b27c40db2c7282e6e4a42
(GET) Return User stats info
Response:
{
"cap": 40304044000000000000,
"kyced": true,
"rich": false
}
/sourceAmount?source=TUSD&dest=ETH&destAmount=500
(GET) Return Source Amount
Response:
{
"success": true,
"value": "129808.7692"
}
/refprice?base=KNC"e=ETH
(GET) Return reference price Price is the average price from multiple source data (Chainlink, Bandchain, Kyber). If Chainlink doesn't have price for requested pair, then final price will be average of Bandchain and Kyber prices. If both Chainlink and Bandchain don't have price for requested pair, then final price will be Kyber price. Response:
{
"success": true,
"value": "0.0032"
}