bitFlyer Lightning (https://lightning.bitflyer.jp/) API Client for Smalltalk. Work in progress.
- Pharo 6.1
- NeoJSON (https://github.com/svenvc/NeoJSON)
client := BitFlyerLightningClient new.
client marketList.
client := BitFlyerLightningClient new.
client boardInformation: 'BTC_JPY'.
client := BitFlyerLightningClient new.
client ticker: 'BTC_JPY'.
client := BitFlyerLightningClient new.
"Get latest 100 executions."
client executions: 'BTC_JPY' count: 100.
"Get executions before specific execution id."
client executions: 'BTC_JPY' before: 100.
"Get executions after specific execution id"
client executions: 'BTC_JPY' after: 100.
BLSettings default apiKey: '<YOUR-API-KEY>'.
BLSettings default apiSecret: '<YOUR-API-SECRET>'.
client := BitFlyerLightningClient new.
client accountBalance.
client := BitFlyerLightningClient new.
buyOrder := BLBuyOrder productCode: 'BTC_JPY' childOrderType: (BLChildOrderTypeConstants limit) price: 900000 size: 0.001 minuteToExpire: 10 timeInForce: (BLTimeInForceConstants goodTilCanceled ).
client sendChildOrder: buyOrder.
client := BitFlyerLightningClient new.
client cancelChildOrder: 'BTC_JPY' withChildOrderAcceptanceId: '<CHILD-ORDER-ACCEPTANCE-ID>'.