- TypeScript
- Koa
- Winston
- Joi
- Jest
- All listed API endpoints
- Query param validation
- Decryption & Encryption (methods are commented for testing purposes)
- Global error handling
- Cluster API
- Logging by cluster.pid by error / info
Install modules:
yarn
yarn prod:start
yarn test
url: http://localhost:3000/orderbook
params:
id: string (required)
symbol: string (required)
response: {
bids": [
[
0.08184,
6
],
...
]
}
url: http://localhost:3000/orderbook
params:
id: kraken
symbol: BCH/BTC
URL: http://localhost:3000/orderbook?id=hitbtc&symbol=BCH%2FBTC
url: http://localhost:3000/symbols
params:
id: string (required)
response: [
"ADA/BTC",
"ADA/CAD",
"ADA/ETH",
"ADA/EUR",
...
]
url: http://localhost:3000/symbols
params:
id: bxinth
url: http://localhost:3000/ticker
params:
id: string (required)
symbol: string (required)
response: {
"symbol": "BCH/BTC",
"timestamp": 1538148033751,
...
}
url: http://localhost:3000/ticker
params:
id: kraken
symbol: BCH/BTC
url: http://localhost:3000/balance
params:
id: string (required)
apiKey: string (required)
secret: string (required)
response: {
"symbol": "BCH/BTC",
"timestamp": 1538148033751,
...
}
url: http://localhost:3000/balance
params:
id: bxinth
apiKey: 484a63e83ccd
secret: 80c6c46d100a
URL: http://localhost:3000/balance?id=bxinth&apiKey=484a63e83ccd&secret=80c6c46d100a
url: http://localhost:3000/placeOrder
params:
id: string (required)
symbol: string (required)
orderType: string (required)
side: string (required - buy | sell)
amount: number (required)
price: number (required)
apiKey: string (required)
secret: string (required)
response: {
...error, need verification
}
url: http://localhost:3000/placeOrder
params:
id: bxinth
symbol: BTC/THB
orderType: limit
side: sell
amount: 0.321
price: 100
apiKey: 484a63e83ccd
secret: 80c6c46d100a