2017 © Pedro Peláez
 

library opteck-api-client

PHP Client for Opteck platform

image

alexander-emelyanov/opteck-api-client

PHP Client for Opteck platform

  • Friday, April 22, 2016
  • by AlexanderEmelyanov
  • Repository
  • 1 Watchers
  • 1 Stars
  • 1,563 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 32 Versions
  • 0 % Grown

The README.md

Opteck platform API client

Build Status StyleCI Code Climate Code Climate, (*1)

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

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

Installation

Install using Composer, doubtless., (*4)

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

Usage

First, you need to create a client object to connect to the Opteck servers. You will need to acquire an Affiliate ID and Partner ID for your app first from broker website , then pass the credentials to the client object for logging in., (*5)

$client = new \Opteck\ApiClient(<Affiliate ID>, <Partner ID>);

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

Create lead

You can create lead on the Opteck platform using one request., (*7)

/** @var \Opteck\Requests\CreateLead $request */
$request = new \Opteck\Requests\CreateLead([
    'email'       => 'john.smith@gmail.com',
    'password'    => 'qwerty',
    'firstName'   => 'John',
    'lastName'    => 'Smith',
    'language'    => 'EN',
    'country'     => 'GB',
    'phone'       => '442088963321', // Pizza Hut Restaurant
    'campaign'    => 'test_campaign_1',
    'subCampaign' => 'test_sub_campaign_1',
]);

/** @var \Opteck\Responses\CreateLead $response */
$response = $apiClient->createLead($request);

echo "Lead created successfully with ID: " . $response->getLeadId() . PHP_EOL;

Get lead details

You should use Lead Details for auto-login as well and for retrieving more information about lead., (*8)

/** @var \Opteck\Responses\GetLeadDetails $leadDetails */
$leadDetails = $apiClient->getLeadDetails($email);

Auth

/** @var \Opteck\Responses\Auth $authResponse */
$authResponse = $apiClient->auth('john.smith@gmail.com', 'qwerty');

echo "Lead authorized with token [" . $authResponse->getToken() . "] valid up to " . $authResponse->getExpiryTimestamp() . PHP_EOL;

Get deposits

Code bellow retrieves all deposits for last 7 days., (*9)

/** @var \Opteck\Entities\Deposit[] $deposits */
$deposits = $apiClient->getDeposits(time() - 2600 * 24 * 7, time());

Trading

Get option types

/** @var \Opteck\Entities\OptionType[] $optionTypes */
$optionTypes = $apiClient->getOptionTypes();

Get markets

/** @var \Opteck\Entities\Market[] $markets */
$markets = $apiClient->getMarkets();

Get assets

/** @var \Opteck\Entities\Asset[] $assets */
$assets = $apiClient->getAssets();

Get asset rate

/** @var \Opteck\Responses\GetAssetRate $assetRate */
$assetRate = $apiClient->getAssetRate(<Asset ID>);

Trade

This package provide special wrapper for Opteck logic. You can use it for easy trading., (*10)

$apiClient->openPosition('<Email>', '<Password>', '<Symbol>', <Direction>, <Amount>);

Trade actions report

/** \Opteck\Entities\TradeAction[] $tradeActions */
$tradeActions = $apiClient->getTradeActions('<Email>');

The Versions

22/04 2016

dev-master

9999999-dev

PHP Client for Opteck platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options opteck

22/04 2016

v0.7.5

0.7.5.0

PHP Client for Opteck platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options opteck

22/04 2016

dev-analysis-XkaQ61

dev-analysis-XkaQ61

PHP Client for Opteck platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options opteck

22/04 2016

v0.7.4

0.7.4.0

PHP Client for Opteck platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options opteck

22/04 2016

v0.7.3

0.7.3.0

PHP Client for Opteck platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options opteck

22/04 2016

v0.7.2

0.7.2.0

PHP Client for Opteck platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options opteck

22/04 2016

v0.7.1

0.7.1.0

PHP Client for Opteck platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options opteck

22/04 2016

dev-analysis-87aZMV

dev-analysis-87aZMV

PHP Client for Opteck platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options opteck

22/04 2016

v0.7.0

0.7.0.0

PHP Client for Opteck platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options opteck

21/04 2016

0.6.2

0.6.2.0

PHP Client for Opteck platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options opteck

21/04 2016

dev-analysis-8QMnAm

dev-analysis-8QMnAm

PHP Client for Opteck platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options opteck

21/04 2016

v0.6.1

0.6.1.0

PHP Client for Opteck platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options opteck

21/04 2016

v0.6.0

0.6.0.0

PHP Client for Opteck platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options opteck

20/04 2016

v0.5.1

0.5.1.0

PHP Client for Opteck platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options opteck

20/04 2016

dev-analysis-8jLAW7

dev-analysis-8jLAW7

PHP Client for Opteck platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options opteck

20/04 2016

v0.5.0

0.5.0.0

PHP Client for Opteck platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options opteck

20/04 2016

v0.4.0

0.4.0.0

PHP Client for Opteck platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options opteck

20/04 2016

dev-analysis-zRvN07

dev-analysis-zRvN07

PHP Client for Opteck platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options opteck

20/04 2016

v0.3.1

0.3.1.0

PHP Client for Opteck platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options opteck

19/04 2016

dev-analysis-qBMJ1r

dev-analysis-qBMJ1r

PHP Client for Opteck platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options opteck

15/04 2016

v0.2.1

0.2.1.0

PHP Client for Opteck platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options opteck

15/04 2016

v0.2.0

0.2.0.0

PHP Client for Opteck platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options opteck

14/04 2016

v0.1.7

0.1.7.0

PHP Client for Opteck platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options opteck

13/04 2016

v0.1.6

0.1.6.0

PHP Client for Opteck platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options opteck

13/04 2016

dev-analysis-qM1jov

dev-analysis-qM1jov

PHP Client for Opteck platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options opteck

13/04 2016

v0.1.5

0.1.5.0

PHP Client for Opteck platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options opteck

13/04 2016

v0.1.4

0.1.4.0

PHP Client for Opteck platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options opteck

13/04 2016

v0.1.3

0.1.3.0

PHP Client for Opteck platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options opteck

13/04 2016

v0.1.2

0.1.2.0

PHP Client for Opteck platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options opteck

13/04 2016

v0.1.1

0.1.1.0

PHP Client for Opteck platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options opteck

12/04 2016

v0.1.0

0.1.0.0

PHP Client for Opteck platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options opteck

12/04 2016

dev-analysis-qJ2VBa

dev-analysis-qJ2VBa

PHP Client for Opteck platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexander Emelyanov

api binary options opteck