2017 © Pedro Peláez
 

library anyoption-api-client

PHP Client for AnyOption platform

image

alexander-emelyanov/anyoption-api-client

PHP Client for AnyOption platform

  • Thursday, March 17, 2016
  • by AlexanderEmelyanov
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1,881 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 9 Versions
  • 0 % Grown

The README.md

AnyOption API Client

Build Status StyleCI Code Climate, (*1)

This repository contains PHP Client for AnyOption platform., (*2)

AnyOption is the world's first and largest trading platform for binary options, one touch options and dozens of other advanced derivatives., (*3)

Installation

Install using Composer, doubtless., (*4)

$ composer require alexander-emelyanov/anyoption-api-client

Usage

First, you need to create a client object to connect to the AnyOption servers. You will need to acquire an API username and API password for your app first from AnyOption, then pass the credentials to the client object for logging in., (*5)

$client = new \AnyOption\ApiClient([
    'apiUser' => [
        'userName' => '<ANYOPTION_USERNAME>',
        'password' => '<ANYOPTION_PASSWORD>'
    ],
    'url' => '<ANYOPTION_URL>'
]);

Also your IP address must be added to whitelist of AnyOption platform. Feel free to contact me for more details., (*6)

Assuming your credentials is valid and your IP is whitelisted, you are good to go!, (*7)

Insert user command

$command = new \AnyOption\Commands\InsertUser([
    'utcOffset' => 0,
    'locale' => 'en',
    'register' => [
        'firstName' => 'John',
        'lastName' => 'Smith',
        'email' => 'john.smith@my.com',
        'mobilePhone' => '493025922774',
        'password' => 'qwerty',
        'password2' => 'qwerty',
        'countryName' => 'DEU',
        'ip' => '127.0.0.1',
        'terms' => '',
    ],
]);

/** @var \AnyOption\Responses\InsertUser $response */
$response = $client->call($command);

Note: full list of allowed countries you can get using:, (*8)

$countries = \AnyOption\Dictionaries::countries();

GetFTDUsersByDate

$command = new \AnyOption\Commands\GetFTDUsersByDate([
    'locale' => 'en',
    'dateRequest' => date('Y-m-d'),
]);

/** @var \AnyOption\Responses\GetFTDUsersByDate $response */
$response = $client->call($command);

Contribution

You are welcome!, (*9)

Running tests

You can run unit tests via PHPUnit:, (*10)

$ vendor/bin/phpunit tests

Note: you should install dev dependencies for this package using, (*11)

$ composer update --dev

The Versions

17/03 2016

dev-master

9999999-dev

PHP Client for AnyOption platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options anyoption

17/03 2016

dev-analysis-zD2dJ9

dev-analysis-zD2dJ9

PHP Client for AnyOption platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options anyoption

17/03 2016

v0.1.5

0.1.5.0

PHP Client for AnyOption platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options anyoption

17/02 2016

v0.1.4

0.1.4.0

PHP Client for AnyOption platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options anyoption

10/02 2016

dev-dev

dev-dev

PHP Client for AnyOption platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options anyoption

10/02 2016

v0.1.3

0.1.3.0

PHP Client for AnyOption platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options anyoption

10/02 2016

v0.1.2

0.1.2.0

PHP Client for AnyOption platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options anyoption

09/02 2016

v0.1.1

0.1.1.0

PHP Client for AnyOption platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options anyoption

27/01 2016

v0.1.0

0.1.0.0

PHP Client for AnyOption platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options anyoption