PHPackages                             alexander-emelyanov/opteck-api-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. alexander-emelyanov/opteck-api-client

ActiveLibrary[API Development](/categories/api)

alexander-emelyanov/opteck-api-client
=====================================

PHP Client for Opteck platform

v0.7.5(10y ago)51.6k1MITPHPPHP &gt;=5.5

Since Apr 12Pushed 10y ago2 watchersCompare

[ Source](https://github.com/alexander-emelyanov/opteck-api-client)[ Packagist](https://packagist.org/packages/alexander-emelyanov/opteck-api-client)[ RSS](/packages/alexander-emelyanov-opteck-api-client/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (6)Versions (32)Used By (0)

Opteck platform API client
==========================

[](#opteck-platform-api-client)

[![Build Status](https://camo.githubusercontent.com/4eda0391547f533b3b9163c6e136059689eae64c7935a8f96b154ea344d6df04/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f616c6578616e6465722d656d656c79616e6f762f6f707465636b2d6170692d636c69656e742f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/alexander-emelyanov/opteck-api-client)[![StyleCI](https://camo.githubusercontent.com/5fa3daeb9dd6b02083c80f2d8a1c7debb2b4e738949ca2578ac4d044abf303a4/68747470733a2f2f7374796c6563692e696f2f7265706f732f35363035343436392f736869656c64)](https://styleci.io/repos/56054469)[![Code Climate](https://camo.githubusercontent.com/1b9a5dd81b0a0d50192fc7004dcacdfb2cbac07394142e1aeb04daba2b6251c9/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636c696d6174652f6769746875622f616c6578616e6465722d656d656c79616e6f762f6f707465636b2d6170692d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://codeclimate.com/github/alexander-emelyanov/opteck-api-client)[![Code Climate](https://camo.githubusercontent.com/820818cfb611d62a6685272670f8f2068181f950278ea1cf990ad3546f7e40d3/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636c696d6174652f636f7665726167652f6769746875622f616c6578616e6465722d656d656c79616e6f762f6f707465636b2d6170692d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://codeclimate.com/github/alexander-emelyanov/opteck-api-client/coverage)

This repository contains PHP Client for Opteck platform.

Opteck is a trading platform for binary options.

Installation
------------

[](#installation)

Install using [Composer](http://getcomposer.org), doubtless.

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

Usage
-----

[](#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 ](http://www.optaffiliates.com/), then pass the credentials to the client object for logging in.

```
$client = new \Opteck\ApiClient(, );
```

Assuming your credentials is valid, you are good to go!

### Create lead

[](#create-lead)

You can create lead on the Opteck platform using one request.

```
/** @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

[](#get-lead-details)

You should use Lead Details for auto-login as well and for retrieving more information about lead.

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

### Auth

[](#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

[](#get-deposits)

Code bellow retrieves all deposits for last 7 days.

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

Trading
-------

[](#trading)

### Get option types

[](#get-option-types)

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

### Get markets

[](#get-markets)

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

### Get assets

[](#get-assets)

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

### Get asset rate

[](#get-asset-rate)

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

### Trade

[](#trade)

This package provide special wrapper for Opteck logic. You can use it for easy trading.

```
$apiClient->openPosition('', '', '', , );
```

### Trade actions report

[](#trade-actions-report)

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

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

23

Last Release

3721d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3701798abcce2c6ebf807c4ffe38d9c45c767aabe464b6bc24a58674aeb771d3?d=identicon)[AlexanderEmelyanov](/maintainers/AlexanderEmelyanov)

---

Top Contributors

[![alexander-emelyanov](https://avatars.githubusercontent.com/u/1540608?v=4)](https://github.com/alexander-emelyanov "alexander-emelyanov (54 commits)")

---

Tags

apiBinary OptionsOpteck

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/alexander-emelyanov-opteck-api-client/health.svg)

```
[![Health](https://phpackages.com/badges/alexander-emelyanov-opteck-api-client/health.svg)](https://phpackages.com/packages/alexander-emelyanov-opteck-api-client)
```

###  Alternatives

[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.7k371.6k6](/packages/theodo-group-llphant)[algolia/algoliasearch-client-php

API powering the features of Algolia.

69734.4M145](/packages/algolia-algoliasearch-client-php)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.3M7](/packages/avalara-avataxclient)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[files.com/files-php-sdk

Files.com PHP SDK

2478.1k](/packages/filescom-files-php-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
