Download the PHP package infinex-exchange/infinex-php without Composer
On this page you can find all versions of the php package infinex-exchange/infinex-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download infinex-exchange/infinex-php
More information about infinex-exchange/infinex-php
Files in infinex-exchange/infinex-php
Package infinex-php
Short Description Official PHP wrapper for the Infinex APIs
License Apache-2.0
Informations about the package infinex-php
infinex-php
Official PHP wrapper for the Infinex APIs.
Installation
composer require infinex-exchange/infinex-php
Usage
Check examples/ folder for more usage examples.
API
Blocking API over HTTP:
Non-blocking async API over HTTP:
Blocking API over WebSockets:
Non-blocking async API over WebSockets:
Streams
To use Infinex streams, you need to create a ReactPHP EventLoop, initialize the StreamsClient
object and connect to the exchange server:
If the connection is broken, the StreamsClient
object will automatically reconnect, re-login and restore all subscriptions. However, certain events, e.g. orderbook update, may take place when we were not connected. Therefore, we can catch and react to connection lost and restore events.
To subscribe to a stream or multiple streams we can use the sub
function. As the first argument, we pass the name of the stream or an array of stream names, as the second argument we pass the callback function that will be called each time the stream receives an event.
To unsubscribe from a stream or multiple streams, use the unsub
function
To use private streams, login to the exchange with your API key first
All versions of infinex-php with dependencies
react/async Version ^4.0
ratchet/pawl Version ^0.4.1
react/promise Version ^3@dev
evenement/evenement Version ^3.0