2017 © Pedro Peláez
 

library tradesmarter-api-client

PHP Client for TradeSmarter platform

image

alexander-emelyanov/tradesmarter-api-client

PHP Client for TradeSmarter platform

  • Sunday, July 10, 2016
  • by AlexanderEmelyanov
  • Repository
  • 2 Watchers
  • 0 Stars
  • 1,851 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 14 Versions
  • 0 % Grown

The README.md

TradeSmarter 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/tradesmarter-api-client

Usage

First, you need to create a client object to connect to the TradeSmarter 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 \TradeSmarter\ApiClient("https://<username>:<password>@<hostname>");

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

Get countries list

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

Register new customer

$request = new TradeSmarter\Requests\Register([
    'firstName' => 'John',
    'lastName' => 'Smith',
    'email' => 'john.smith@gmail.com',
    'confirmed' => 1,
    'password' => 'qwerty',
    'phone' => '+123456789',
    'country' => 'gb',
    'locale' => 'en-GB',
    'params' => [],
    'lead' => 0,
]);

/** @var \TradeSmarter\Responses\Register $response */
$response = $client->register($request);

Login user

$request = new \TradeSmarter\Requests\Login([
    'email' => 'john.smith@gmail.com',
    'password' => 'qwerty',
]);

/** @var \TradeSmarter\Responses\Login $response */
$response = $client->login($request);

Get user info

$request = new \TradeSmarter\Requests\Login([
    'email' => 'john.smith@gmail.com',
    'password' => 'qwerty',
]);

/** @var \TradeSmarter\Responses\UserInfo $response */
$response = $client->getUserInfo($request);

Contribution

You are welcome!, (*7)

Running tests

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

$ vendor/bin/phpunit tests

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

$ composer update --dev

The Versions

10/07 2016

dev-master

9999999-dev

PHP Client for TradeSmarter platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradesmarter

12/04 2016

v0.3.1

0.3.1.0

PHP Client for TradeSmarter platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradesmarter

29/03 2016

v0.3.0

0.3.0.0

PHP Client for TradeSmarter platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradesmarter

29/03 2016

dev-analysis-XVryPg

dev-analysis-XVryPg

PHP Client for TradeSmarter platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradesmarter

24/03 2016

dev-analysis-XlKJj9

dev-analysis-XlKJj9

PHP Client for TradeSmarter platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradesmarter

24/03 2016

v0.2.5

0.2.5.0

PHP Client for TradeSmarter platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradesmarter

24/03 2016

dev-analysis-zD24Z5

dev-analysis-zD24Z5

PHP Client for TradeSmarter platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradesmarter

15/03 2016

v0.2.4

0.2.4.0

PHP Client for TradeSmarter platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradesmarter

11/03 2016

v0.2.3

0.2.3.0

PHP Client for TradeSmarter platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradesmarter

11/03 2016

v0.2.2

0.2.2.0

PHP Client for TradeSmarter platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradesmarter

11/03 2016

v0.2.1

0.2.1.0

PHP Client for TradeSmarter platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradesmarter

10/03 2016

v0.2.0

0.2.0.0

PHP Client for TradeSmarter platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradesmarter

09/03 2016

v0.1.1

0.1.1.0

PHP Client for TradeSmarter platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradesmarter

09/03 2016

v0.1.0

0.1.0.0

PHP Client for TradeSmarter platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options tradesmarter