2017 © Pedro Peláez
 

library tradologic-api-client

PHP Client for TradoLogic platform

image

alexander-emelyanov/tradologic-api-client

PHP Client for TradoLogic platform

  • Tuesday, April 12, 2016
  • by AlexanderEmelyanov
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1,782 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 40 Versions
  • 0 % Grown

The README.md

TradoLogic platform API client

Build Status StyleCI Code Climate, (*1)

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

TradeSmarter is a trading platform for binary options., (*3)

Installation

Install using Composer, doubtless., (*4)

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

Usage

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

$client = new \TradoLogic\ApiClient([
    'url' => 'https://b2b-api.tradologic.net',
]);

Assuming your credentials is valid, you are good to go!, (*6)

Get countries list

/** @var \TradoLogic\Entities\Country[] $countries */
$countries = $client->countries();

Get languages list

/** @var \TradoLogic\Entities\Language[] $languages */
$languages = $client->languages();

Create user

For ability to create user your IP should be added to whitelist. So, this operation requires authorization. You should provide username, password and account ID to \TradoLogic\ApiClient constructor. It should seems like this:, (*7)

$client = new \TradoLogic\ApiClient([
    'url' => 'https://b2b-api.tradologic.net',
    'username' => '<YOUR_USERNAME>',
    'password' => '<YOUR_PASSWORD>',
    'accountId' => <YOUR_ACCOUNT_ID>,
]);

Then you can register user., (*8)

/** @var \TradoLogic\Responses\UserCreate $response */
$response = $client->createUser(new \TradoLogic\Requests\UserCreate([
    'userPassword' => '<USER_PASSWORD>',
    'userFirstName' => '<USER_FIRST_NAME>',
    'userLastName' => '<USER_LAST_NAME>',
    'phone' => '<USER_PHONE>',
    'email' => '<USER_EMAIL>',
]));

Login user

For redirect user to TradoLogic base website you should get Session ID for this user., (*9)

$request = new \TradoLogic\Requests\UserLogin([
    'email' => 'alex.emelianov@gmail.com',
    'password' => 'portal',
    'userIpAddress' => '94.74.194.219',
]);

/** @var $response \TradoLogic\Responses\UserLogin */
$response = $client->loginUser($request);

if ($response->isSuccess()) {
    echo ("User logged successfully with Session ID: " . $response->getSessionId() . PHP_EOL);
}

Get deposits

/** @var $response \TradoLogic\Entities\Deposit[] */
$response = $client->deposits();

Get active binary options

For trading integration you must get list of active binary options. You can do it really easy:, (*10)

/** @var \TradoLogic\Entities\Options\Binary[] $options */
$options = $client->getBinaryOptions();

Trading

When active binary options are retrieved you can open positions (binary options) for your customers., (*11)

$client->createBinaryOption(new \TradoLogic\Requests\BinaryOptionCreate(<User ID>, <Option ID>, <Volume>, <Is Call>));

Trades

You can retrieve trades history for specified users., (*12)

/**
 * @var \TradoLogic\Entities\Trades\Regular[]
 */
$trades = $client->getRegularUserTrades(new \TradoLogic\Requests\RegularUserTradesGet(<User ID>[, <Only open>]));

The Versions

12/04 2016

dev-master

9999999-dev

PHP Client for TradoLogic platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradologic

12/04 2016

v2.0.2

2.0.2.0

PHP Client for TradoLogic platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradologic

08/04 2016

v2.0.1

2.0.1.0

PHP Client for TradoLogic platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradologic

08/04 2016

v2.0.0

2.0.0.0

PHP Client for TradoLogic platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradologic

08/04 2016

v1.3.9

1.3.9.0

PHP Client for TradoLogic platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradologic

08/04 2016

v1.3.8

1.3.8.0

PHP Client for TradoLogic platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradologic

08/04 2016

dev-analysis-qJ2LJb

dev-analysis-qJ2LJb

PHP Client for TradoLogic platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradologic

07/04 2016

v1.3.7

1.3.7.0

PHP Client for TradoLogic platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradologic

07/04 2016

v1.3.6

1.3.6.0

PHP Client for TradoLogic platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradologic

05/04 2016

v1.3.5

1.3.5.0

PHP Client for TradoLogic platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradologic

05/04 2016

dev-analysis-8nN7Y5

dev-analysis-8nN7Y5

PHP Client for TradoLogic platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradologic

04/04 2016

v1.3.4

1.3.4.0

PHP Client for TradoLogic platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradologic

04/04 2016

dev-analysis-q5Zvly

dev-analysis-q5Zvly

PHP Client for TradoLogic platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradologic

04/04 2016

v1.3.3

1.3.3.0

PHP Client for TradoLogic platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradologic

04/04 2016

dev-analysis-8QMOGp

dev-analysis-8QMOGp

PHP Client for TradoLogic platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradologic

31/03 2016

v1.3.2

1.3.2.0

PHP Client for TradoLogic platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradologic

29/03 2016

v1.3.1

1.3.1.0

PHP Client for TradoLogic platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradologic

29/03 2016

dev-analysis-XWNyBE

dev-analysis-XWNyBE

PHP Client for TradoLogic platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradologic

29/03 2016

v1.3.0

1.3.0.0

PHP Client for TradoLogic platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradologic

24/03 2016

v1.2.12

1.2.12.0

PHP Client for TradoLogic platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradologic

24/03 2016

v1.2.11

1.2.11.0

PHP Client for TradoLogic platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradologic

24/03 2016

v1.2.9

1.2.9.0

PHP Client for TradoLogic platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradologic

24/03 2016

v1.2.10

1.2.10.0

PHP Client for TradoLogic platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradologic

24/03 2016

dev-analysis-zRvn6D

dev-analysis-zRvn6D

PHP Client for TradoLogic platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradologic

24/03 2016

v1.2.8

1.2.8.0

PHP Client for TradoLogic platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradologic

24/03 2016

v1.2.7

1.2.7.0

PHP Client for TradoLogic platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradologic

24/03 2016

dev-t1

dev-t1

PHP Client for TradoLogic platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradologic

23/03 2016

v1.2.6

1.2.6.0

PHP Client for TradoLogic platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradologic

23/03 2016

v1.2.5

1.2.5.0

PHP Client for TradoLogic platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradologic

23/03 2016

v1.2.4

1.2.4.0

PHP Client for TradoLogic platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradologic

22/03 2016

v1.2.3

1.2.3.0

PHP Client for TradoLogic platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradologic

22/03 2016

v1.2.2

1.2.2.0

PHP Client for TradoLogic platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradologic

22/03 2016

dev-analysis-XlK3yk

dev-analysis-XlK3yk

PHP Client for TradoLogic platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradologic

22/03 2016

v1.2.1

1.2.1.0

PHP Client for TradoLogic platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradologic

22/03 2016

v1.2.0

1.2.0.0

PHP Client for TradoLogic platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradologic

22/03 2016

v1.1.0

1.1.0.0

PHP Client for TradoLogic platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradologic

22/03 2016

dev-analysis-87an52

dev-analysis-87an52

PHP Client for TradoLogic platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradologic

22/03 2016

dev-analysis-zYjkWv

dev-analysis-zYjkWv

PHP Client for TradoLogic platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradologic

15/03 2016

v1.0.0

1.0.0.0

PHP Client for TradoLogic platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradologic

15/03 2016

v0.1.0

0.1.0.0

PHP Client for TradoLogic platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradologic