WhaleAPI SDK for Python

longportwhale provides an easy-to-use interface for invokes WhaleAPI.

References

The configuration of the SDK.

The Trade API part of the SDK, e.g.: subscribe order events

Quickstart

Install WhaleAPI SDK

pip install longportwhale

Setting environment variables(MacOS/Linux)

export LONGPORT_APP_KEY="App Key get from user center"
export LONGPORT_APP_SECRET="App Secret get from user center"
export LONGPORT_ACCESS_TOKEN="Access Token get from user center"

Setting environment variables(Windows)

setx LONGPORT_APP_KEY "App Key get from user center"
setx LONGPORT_APP_SECRET "App Secret get from user center"
setx LONGPORT_ACCESS_TOKEN "Access Token get from user center"

License

Licensed under either of

  • Apache License, Version 2.0,(LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
  • MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT) at your option.