Download the PHP package rndwiga/deriv_apis without Composer

On this page you can find all versions of the php package rndwiga/deriv_apis. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package deriv_apis

Deriv WebSocket API SDK

A PHP SDK for interacting with Deriv's WebSocket APIs.

Installation

Install the package via Composer:

Requirements

Quick Start

Available API Handlers

The SDK provides handlers for all Deriv WebSocket APIs:

Authentication

For authenticated requests, you need to provide an API token:

Examples

See the examples directory for more usage examples.

API Reference

Account API

For detailed documentation on using the Account API, see the Account API Guide.

Market Data API

Trading API

Cashier API

Economic Calendar API

Copy Trading API

MT5 API

For more details on available methods and parameters, refer to the Deriv API Documentation.

Copy Trading API

Wallet API

Payment Agent API

Payment Agent Guide

Payment agents are individuals or companies that process deposits and withdrawals for Deriv clients in regions where traditional payment methods aren't available. This SDK provides functionality for payment agents to transfer funds to authorized users.

Authentication Requirements

To perform payment agent operations, you must:

  1. Have a payment agent account with Deriv
  2. Generate an API token with the appropriate permissions:
    • Go to your Deriv account > Security & Limits > API Token
    • Create a token with "Admin" or "Payment" scope
    • Use this token when initializing the SDK

Transferring Funds to Users

Payment agents can transfer funds to authorized users using the paymentAgentTransfer method:

Required Parameters:

Optional Parameters:

Error Handling

Payment agent transfers can fail for various reasons, such as insufficient balance or invalid client ID. Always implement proper error handling:

Tracking Transfers

You can track payment agent transfers using the Reports API:

For a complete working example, see the examples/payment_agent_example.php file.

Testing

This package includes comprehensive tests to ensure all functionality works as expected. The tests are written using Pest PHP, a testing framework built on top of PHPUnit with a more expressive syntax.

Running Tests

To run the tests, use the following command:

Available Tests

The package includes tests for the following API handlers:

Writing Tests

If you want to contribute to the package by adding more tests, please follow the existing pattern. Each test file should:

  1. Mock the DerivClient to avoid actual API calls
  2. Test each method of the API handler
  3. Verify that the correct parameters are passed to the sendRequest method
  4. Verify that the result from sendRequest is correctly returned by the method being tested

For an example, see the Account API tests.

References

License

This package is open-sourced software licensed under the MIT license.


All versions of deriv_apis with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-json Version *
phrity/websocket Version ^3.5
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rndwiga/deriv_apis contains the following files

Loading the files please wait ...