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
- /getLatestBlock: return latest block number of network
- /getRateUSD: return USD price of token base on it's expectedRate
- /getRate: return rate of token with eth (expectedRate and minRate)
- /getKyberEnabled: get kyberEnabled from contract
- /getMaxGasPrice: get max GasPrice from contract
- /getGasPrice: return gasPrice get from https://ethgasstation.info/
- /getRateETH: return USD price of ETH from Coingecko
- /latestBlock: return latest block number of network
- /rateUSD: return USD price of token base on it's expectedRate
- /rate: return rate of token with eth (expectedRate and minRate)
- /kyberEnabled: get kyberEnabled from contract
- /maxGasPrice: get max GasPrice from contract
- /gasPrice: return gasPrice get from https://ethgasstation.info/
- /rateETH: return USD price of ETH from Coingecko
- /users:
params: address=0x2262d4f6312805851e3b27c40db2c7282e6e4a42
return user stats info - /sourceAmount:
params: ?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"
}