PHPackages                             tradewatch-io/sdk - 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. tradewatch-io/sdk

ActiveLibrary[API Development](/categories/api)

tradewatch-io/sdk
=================

Tradewatch PHP Library

1.0.0(2mo ago)00[1 PRs](https://github.com/tradewatch-io/php-sdk/pulls)PHPPHP ^8.1

Since Nov 25Pushed 2mo agoCompare

[ Source](https://github.com/tradewatch-io/php-sdk)[ Packagist](https://packagist.org/packages/tradewatch-io/sdk)[ RSS](/packages/tradewatch-io-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (11)Versions (3)Used By (0)

TradeWatch.io PHP SDK
=====================

[](#tradewatchio-php-sdk)

[![](https://camo.githubusercontent.com/dc05a17791e86a7aa18a8b75294cfe4924f83c54a256b438a6cb7bdf4935cf54/68747470733a2f2f747261646577617463682e696f2f)](https://camo.githubusercontent.com/dc05a17791e86a7aa18a8b75294cfe4924f83c54a256b438a6cb7bdf4935cf54/68747470733a2f2f747261646577617463682e696f2f)

[![php shield](https://camo.githubusercontent.com/c6935ea725f448fdb79c5a9a86bf2f898610c8bf44028a3192176889b47cdba6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d7061636b61676973742d70696e6b)](https://packagist.org/packages/tradewatch-io/sdk)

[ ![TradeWatch.io logo](https://camo.githubusercontent.com/5e8557f16403be76d844bd1c69f99c8ba4bf894a17f9b8a5b7dfc146d84f7895/68747470733a2f2f7075622d65386262373061366363313834343133386436613535666134613434626134322e72322e6465762f6c6f676f2d707572706c652e706e67 "TradeWatch.io")](https://tradewatch.io/)Official SDK for the [TradeWatch.io API](https://tradewatch.io/docs/api-reference/introduction).

Other SDKs
----------

[](#other-sdks)

[![Python SDK](https://camo.githubusercontent.com/5df4d19abd3570939f3d2c5fd48f3fefa51bb8c7a51d18a81a053bae65a646e6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f507974686f6e5f53444b2d3337373641423f7374796c653d666c61742d737175617265266c6f676f3d707974686f6e266c6f676f436f6c6f723d7768697465)](https://github.com/tradewatch-io/python-sdk)[![TypeScript SDK](https://camo.githubusercontent.com/2c1b624b4670a730563d553d71a168046f92419bf1e400acd03e18e91d35791a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f547970655363726970745f53444b2d3331373843363f7374796c653d666c61742d737175617265266c6f676f3d74797065736372697074266c6f676f436f6c6f723d7768697465)](https://github.com/tradewatch-io/typescript-sdk)[![.NET SDK](https://camo.githubusercontent.com/d0f84b6e0cc2550823aa0eaca64899e32d015d27e1623e3d1913635790091412/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2e4e45545f53444b2d3531324244343f7374796c653d666c61742d737175617265266c6f676f3d646f746e6574266c6f676f436f6c6f723d7768697465)](https://github.com/tradewatch-io/dotnet-sdk)[![Java SDK](https://camo.githubusercontent.com/a10d83cc654fbda4715a1e3845295a2a3b096694a20d80b26280f90e1e26da76/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4a6176615f53444b2d4544384230303f7374796c653d666c61742d737175617265266c6f676f3d6f70656e6a646b266c6f676f436f6c6f723d7768697465)](https://github.com/tradewatch-io/java-sdk)[![Go SDK](https://camo.githubusercontent.com/f15c114a7b02c6640177c837187e562daad163e474be95dc88907e97ba318423/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f476f5f53444b2d3030414444383f7374796c653d666c61742d737175617265266c6f676f3d676f266c6f676f436f6c6f723d7768697465)](https://github.com/tradewatch-io/go-sdk)[![Ruby SDK](https://camo.githubusercontent.com/d2737d6e2366e2ab55ed496dda8299e7438e6551ad2bc7b0ae3a105cdc757060/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f527562795f53444b2d4343333432443f7374796c653d666c61742d737175617265266c6f676f3d72756279266c6f676f436f6c6f723d7768697465)](https://github.com/tradewatch-io/ruby-sdk)[![Swift SDK](https://camo.githubusercontent.com/19755a9089355987deff26abacd34738575cd09c69f74825eb5b812d690dd957/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53776966745f53444b2d4641373334333f7374796c653d666c61742d737175617265266c6f676f3d7377696674266c6f676f436f6c6f723d7768697465)](https://github.com/tradewatch-io/swift-sdk)[![Rust SDK](https://camo.githubusercontent.com/df56ca85ec7725607105a7a4005e14369c4936ae88897c27ea03b7c7933a4312/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f527573745f53444b2d3030303030303f7374796c653d666c61742d737175617265266c6f676f3d72757374266c6f676f436f6c6f723d7768697465)](https://github.com/tradewatch-io/rust-sdk)

What is TradeWatch.io?
----------------------

[](#what-is-tradewatchio)

TradeWatch.io is a market data platform and API for real-time and historical prices across crypto, stocks, indices, currencies, and commodities.

Try the Interactive API Playground
----------------------------------

[](#try-the-interactive-api-playground)

Want to test endpoints without writing code first? Use the [TradeWatch Interactive API Playground](https://dash.tradewatch.io/api-explorer) to run requests directly in your browser.

[![TradeWatch Interactive API Playground](https://camo.githubusercontent.com/7e48bc490f640a25fbaffb1e02c0541a942128fab032e66c05cbb7d21d215ee8/68747470733a2f2f747261646577617463682e696f2f6170692d706c617967726f756e642e706e67)](https://dash.tradewatch.io/api-explorer)

Resources
---------

[](#resources)

- REST API reference:
- WebSocket API reference:
- Support channels:

Quick Start
-----------

[](#quick-start)

1. Create an API key in the [TradeWatch Dashboard](https://dash.tradewatch.io/register).
2. Follow platform setup docs: [Getting started](https://tradewatch.io/docs/quickstart).

Table of Contents
-----------------

[](#table-of-contents)

- [Documentation](#documentation)
- [Requirements](#requirements)
- [Installation](#installation)
- [Usage](#usage)
- [Exception Handling](#exception-handling)
- [Advanced](#advanced)
    - [Custom Client](#custom-client)
    - [Retries](#retries)
    - [Timeouts](#timeouts)
- [Contributing](#contributing)

Documentation
-------------

[](#documentation)

API reference documentation is available [here](https://tradewatch.io/docs/api-reference/introduction).

Requirements
------------

[](#requirements)

This SDK requires PHP ^8.1.

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

[](#installation)

```
composer require tradewatch-io/sdk
```

Usage
-----

[](#usage)

Instantiate and use the client with the following:

```
