Lighter Candlestick API
The candlestick API from Lighter — 2 operation(s) for candlestick.
The candlestick API from Lighter — 2 operation(s) for candlestick.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/lighter:lighter-candlestick-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Lighter Candlestick API
version: "1.0"
servers:
- url: https://mainnet.zklighter.elliot.ai/
tags:
- name: candlestick
paths:
/api/v1/candles:
get:
summary: candles
operationId: candles
tags:
- candlestick
description: Get candles data. Returns at most 500 candles per call. Zero values are omitted from the response.
parameters:
- name: market_id
in: query
required: true
schema:
type: integer
format: int16
- name: resolution
in: query
required: true
schema:
type: string
enum:
- 1m
- 5m
- 15m
- 30m
- 1h
- 4h
- 12h
- 1d
- name: start_timestamp
in: query
required: true
schema:
type: integer
format: int64
minimum: 0
maximum: 5000000000000
- name: end_timestamp
in: query
required: true
schema:
type: integer
format: int64
minimum: 0
maximum: 5000000000000
- name: count_back
in: query
required: true
schema:
type: integer
format: int64
- name: set_timestamp_to_end
in: query
required: false
schema:
type: boolean
format: boolean
default: 'false'
- name: merge_mark_price
in: query
required: false
schema:
type: boolean
format: boolean
default: 'false'
responses:
'200':
description: A successful response.
content:
application/json:
schema:
$ref: '#/components/schemas/Candles'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ResultCode'
/api/v1/fundings:
get:
summary: fundings
operationId: fundings
tags:
- candlestick
description: Get fundings. Maximum 750 fundings will be returned per call. `count_back` indicates the number of fundings you would like to be returned, starting from `start_timestamp`, if set to 0, all fundings will be returned.
parameters:
- name: market_id
in: query
required: true
schema:
type: integer
format: int16
- name: resolution
in: query
required: true
schema:
type: string
enum:
- 1h
- 1d
- name: start_timestamp
in: query
required: true
schema:
type: integer
format: int64
minimum: 0
maximum: 5000000000000
- name: end_timestamp
in: query
required: true
schema:
type: integer
format: int64
minimum: 0
maximum: 5000000000000
- name: count_back
in: query
required: true
schema:
type: integer
format: int64
responses:
'200':
description: A successful response.
content:
application/json:
schema:
$ref: '#/components/schemas/Fundings'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ResultCode'
/api/v1/markPriceCandles:
get:
summary: markPriceCandles
operationId: markPriceCandles
tags:
- candlestick
description: Get mark price candles
parameters:
- name: market_id
in: query
required: true
schema:
type: integer
format: int16
- name: resolution
in: query
required: true
schema:
type: string
enum:
- 1m
- 5m
- 15m
- 30m
- 1h
- 4h
- 12h
- 1d
- name: start_timestamp
in: query
required: true
schema:
type: integer
format: int64
minimum: 0
maximum: 5000000000000
- name: end_timestamp
in: query
required: true
schema:
type: integer
format: int64
minimum: 0
maximum: 5000000000000
- name: count_back
in: query
required: true
schema:
type: integer
format: int64
responses:
'200':
description: A successful response.
content:
application/json:
schema:
$ref: '#/components/schemas/MarkPriceCandles'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ResultCode'
/api/v1/marketPriceCharts:
get:
summary: marketPriceCharts
operationId: marketPriceCharts
tags:
- candlestick
description: Get last 24h hourly prices for all markets (mark price for perps, index price for spot)
parameters:
- name: market_ids
in: query
required: false
schema:
type: array
items:
type: integer
format: int16
responses:
'200':
description: A successful response.
content:
application/json:
schema:
$ref: '#/components/schemas/MarketPriceCharts'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ResultCode'
components:
schemas:
MarkPriceCandles:
type: object
properties:
code:
type: integer
format: int32
example: '200'
message:
type: string
r:
type: string
example: 15m
description: ' resolution'
c:
type: array
items:
$ref: '#/components/schemas/MarkPriceCandle'
description: ' candles'
title: MarkPriceCandles
required:
- code
- r
- c
Candle:
type: object
properties:
t:
type: integer
format: int64
example: 1767700500000
description: Timestamp
o:
type: number
format: double
example: 3236.86
description: Open price
h:
type: number
format: double
example: 3237.78
description: High price
l:
type: number
format: double
example: 3235.36
description: Low price
c:
type: number
format: double
example: 3235.39
description: Close price
v:
type: number
format: double
example: 55.1632
description: Base token volume (volume0)
V:
type: number
format: double
example: 178530.793575
description: Quote token volume (volume1)
i:
type: integer
format: int64
example: 779870452
description: Last trade ID
C:
type: number
format: double
example: '3024.66'
description: ' close_raw'
H:
type: number
format: double
example: '3034.66'
description: ' high_raw'
L:
type: number
format: double
example: '3014.66'
description: ' low_raw'
O:
type: number
format: double
example: '3024.66'
description: ' open_raw'
title: Candle
description: Abbreviated candle format. Zero values are omitted.
required:
- t
- o
- h
- l
- c
- v
- V
- i
MarketPriceChart:
type: object
properties:
market_id:
type: integer
format: int16
prices:
type: array
items:
type: string
title: MarketPriceChart
required:
- market_id
- prices
MarketPriceCharts:
type: object
properties:
code:
type: integer
format: int32
example: '200'
message:
type: string
resolution:
type: string
example: 1h
price_charts:
type: array
items:
$ref: '#/components/schemas/MarketPriceChart'
title: MarketPriceCharts
required:
- code
- resolution
- price_charts
Fundings:
type: object
properties:
code:
type: integer
format: int32
example: '200'
message:
type: string
resolution:
type: string
example: 1h
fundings:
type: array
items:
$ref: '#/components/schemas/Funding'
title: Fundings
required:
- code
- resolution
- fundings
Candles:
type: object
properties:
code:
type: integer
format: int32
example: 200
r:
type: string
example: 1m
description: Resolution
c:
type: array
items:
$ref: '#/components/schemas/Candle'
description: Array of candles (max 500 per call)
message:
type: string
title: Candles
required:
- code
- r
- c
ResultCode:
type: object
properties:
code:
type: integer
format: int32
example: '200'
message:
type: string
title: ResultCode
required:
- code
MarkPriceCandle:
type: object
properties:
t:
type: integer
format: int64
example: '1640995200'
description: ' timestamp'
o:
type: number
format: double
example: '3024.66'
description: ' open'
h:
type: number
format: double
example: '3034.66'
description: ' high'
l:
type: number
format: double
example: '3014.66'
description: ' low'
c:
type: number
format: double
example: '3024.66'
description: ' close'
sc:
type: integer
format: int64
example: '42'
description: ' sample_count'
title: MarkPriceCandle
required:
- t
- o
- h
- l
- c
- sc
Funding:
type: object
properties:
timestamp:
type: integer
format: int64
example: '1640995200'
value:
type: string
example: '0.0001'
rate:
type: string
example: '0.0001'
direction:
type: string
example: long
title: Funding
required:
- timestamp
- value
- rate
- direction
x-provenance:
method: harvested
publisher: Lighter
source: https://apidocs.lighter.xyz/openapi/page.json
note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
stamped by stamp-openapi-provenance.py (roadmap#793)