> ## Documentation Index
> Fetch the complete documentation index at: https://docs.services.payward.com/llms.txt
> Use this file to discover all available pages before exploring further.

# OHLC

> The `ohlc` channel streams OHLC (open, high, low, close) candles of one `interval` and `tick_type`.

The first message is the latest candle, possibly closed. A candle is sent again whenever it changes; a later `begin` closes the previous one.

```json Subscribe
{
  "method": "subscribe",
  "params": {
    "channel": "ohlc",
    "symbol": [
      "PF_XBTUSD"
    ],
    "interval": "PT5M",
    "snapshot": false,
    "asset_type": "perpetual",
    "country": "DE"
  },
  "req_id": 5
}
```

```json Unsubscribe
{
  "method": "unsubscribe",
  "params": {
    "channel": "ohlc",
    "symbol": [
      "PF_XBTUSD"
    ],
    "interval": "PT5M",
    "asset_type": "perpetual",
    "country": "DE"
  },
  "req_id": 6
}
```

```json Mark price candles
{
  "method": "subscribe",
  "params": {
    "channel": "ohlc",
    "symbol": [
      "PF_XBTUSD"
    ],
    "tick_type": "mark",
    "asset_type": "perpetual",
    "country": "DE"
  },
  "req_id": 9
}
```

```json Snapshot
{
  "channel": "ohlc",
  "type": "snapshot",
  "data": [
    {
      "symbol": "PF_XBTUSD",
      "interval": "PT5M",
      "tick_type": "trade",
      "begin": "2026-10-28T11:15:00Z",
      "end": "2026-10-28T11:20:00Z",
      "open": "81295",
      "high": "81340",
      "low": "81280",
      "close": "81324",
      "volume": "0.4127",
      "vwap": "81311"
    }
  ]
}
```

```json Update
{
  "channel": "ohlc",
  "type": "update",
  "data": [
    {
      "symbol": "PF_XBTUSD",
      "interval": "PT5M",
      "tick_type": "trade",
      "begin": "2026-10-28T11:20:00Z",
      "end": "2026-10-28T11:25:00Z",
      "open": "81324",
      "high": "81331",
      "low": "81309",
      "close": "81309",
      "volume": "0.0165",
      "vwap": "81313"
    }
  ]
}
```

```json Accepted
{
  "method": "subscribe",
  "req_id": 5,
  "success": true,
  "result": {
    "channel": "ohlc",
    "symbol": "PF_XBTUSD",
    "interval": "PT5M",
    "tick_type": "trade"
  }
}
```


## OpenAPI

````yaml https://d2588n1sy4m36o.cloudfront.net/uat/merged/openapi.json webhook websocket.ohlc
openapi: 3.1.0
info:
  title: PWS Public API
  version: '1'
  description: >-
    Integrate with Payward Services to onboard users, manage accounts and funds,
    trade assets, and receive event notifications.
  contact:
    name: Payward Services
servers:
  - url: https://api.sandbox.services.payward.com
security: []
tags:
  - name: Assets
    description: List the assets PWS is willing to swap.
    x-displayName: Assets
  - name: Conversions
    description: >-
      Rule-driven and on-demand fiat ↔ crypto value movement, including
      conversion rules and deposits.
    x-displayName: Conversions
  - name: Auto Earn
    description: >-
      Manage Auto Earn preferences and retrieve allocation and reward
      information.
    x-displayName: Auto Earn
  - name: Bonded Earn
    description: >-
      Allocate funds to and deallocate funds from bonded earn strategies, review
      allocations, and track request status.
    x-displayName: Bonded Earn
  - name: Funding
    description: >-
      Discover deposit and withdrawal options, manage deposit addresses, and
      move funds between accounts.
    x-displayName: Funding
  - name: Derivatives transfers
    description: >-
      Move funds between an account's spot balance and the same owner's futures
      balance.
    x-displayName: Derivatives transfers
  - name: Portfolio
    description: 'Inspect a customer''s portfolio: balances, valuations, and transactions.'
    x-displayName: Portfolio
  - name: Ramp
    description: >-
      Support Ramp flows with discovery, quotes, limits, and hosted checkout
      experiences.
    x-displayName: Ramp
  - name: Reports
    description: Settlement and reconciliation reports for the partner.
    x-displayName: Reports
  - name: Market data stream
    description: Live market data for derivatives instruments.
    x-displayName: Market data stream
  - name: Derivatives instruments
    description: Discover instruments available for trading by asset type.
    x-displayName: Derivatives instruments
  - name: Derivatives tickers
    x-group: Derivatives market data
    description: Read market-data snapshots for supported trading instruments.
    x-displayName: Derivatives tickers
  - name: Derivatives order books
    x-group: Derivatives market data
    description: Read level-two market depth for supported trading instruments.
    x-displayName: Derivatives order books
  - name: Derivatives OHLC
    x-group: Derivatives market data
    description: Read historical candlestick market data for supported trading instruments.
    x-displayName: Derivatives OHLC
  - name: Derivatives orders
    description: Submit and inspect orders by asset type.
    x-displayName: Derivatives orders
  - name: Derivatives trades
    description: Inspect executions by asset type.
    x-displayName: Derivatives trades
  - name: Derivatives leverage
    description: Read and update per-instrument leverage preferences for trading accounts.
    x-displayName: Derivatives leverage
  - name: Swaps
    description: Account-funded quotes that lock a price until they expire or are executed.
    x-displayName: Swaps
  - name: Onchain quotes
    description: Wallet-funded quotes that return the data needed to settle onchain.
    x-displayName: Onchain quotes
  - name: Price trigger swaps
    description: Swaps that wait for a target price before submitting a trade.
    x-displayName: Price trigger swaps
  - name: Travel Rule verifications
    description: Travel Rule address ownership verification flows.
    x-displayName: Travel Rule verifications
  - name: Users
    description: >-
      User onboarding and status flows that the partner manages.


      - **Create User** provisions an account-owned user from an external
      reference and optional email.

      - **Get User** retrieves the user's profile, verification status, and
      required actions.


      Use the returned user `id` for calls that require the user's identifier.
    x-displayName: Users
  - name: Verifications
    description: Identity verification (KYC) submission and status for end users.
    x-displayName: Verifications
  - name: Webhooks
    description: >-
      Register HTTPS destinations to receive event deliveries, rotate signing
      secrets, and inspect, update, or delete existing subscriptions. Each
      subscription is owned by the authenticated partner; deliveries are signed
      with HMAC-SHA256 and retried on transient failures.


      In webhook payloads, `account_id` and `user_id` are in groups of four
      characters, with a space between the groups. For example, `WCQY T95Y CUL2
      A7NX`. The REST APIs send the same identifier without spaces, for example
      `WCQYT95YCUL2A7NX`. Remove the spaces before you compare a webhook
      identifier with a REST identifier.


      Amounts in webhook payloads are decimal strings, in the ledger precision
      of the asset. Compare amounts as decimal numbers, not as strings.
    x-displayName: Webhooks
paths: {}

````