Skip to content

v0.7.0

Latest

Choose a tag to compare

@denistorresan denistorresan released this 26 Aug 14:46
· 2 commits to develop since this release

Added support for DEMO Account.

Unfortunatly this release has a breaking change on the constructor of ByBitApi. The "sandbox" boolean parameter is replaced by "host" string parameter that represent the API endpoint.

The old code was:

$bybitApi = new ByBitApi($api_key, $api_secret, $sandbox);`

The new code will be:

$bybitApi = new ByBitApi($api_key, $api_secret, $host);

Possible host values:

  • ByBit\SDK\ByBitApi::TESTNET_API_URL
  • ByBit\SDK\ByBitApi::DEMO_API_URL
  • ByBit\SDK\ByBitApi::PROD_API_URL

You can replace the old code with:

$bybitApi = new ByBitApi($key, $secret, $sandbox ? ByBitApi::TESTNET_API_URL : ByBitApi::PROD_API_URL);

Full Changelog: v0.6.1...v0.7.0