Skip to content

Conversation

@eervin123
Copy link

Summary

Updates the deprecated /api/v1/candlesticks endpoint to the current /api/v1/candles endpoint.

Background

The Lighter API deprecated the /api/v1/candlesticks endpoint, causing all SDK candlestick downloads to fail with HTTP 403 Forbidden errors.

Evidence

Old endpoint (deprecated):

New endpoint (current):

Verification:

# Old endpoint fails
curl -I "https://mainnet.zklighter.elliot.ai/api/v1/candlesticks?market_id=1&resolution=1h&count_back=1"
# HTTP/2 403

# New endpoint works
curl -I "https://mainnet.zklighter.elliot.ai/api/v1/candles?market_id=1&resolution=1h&count_back=1"
# HTTP/2 200

Changes

  • ✅ Updated OpenAPI specification (openapi.json): /api/v1/candlesticks/api/v1/candles
  • ✅ Updated endpoint in lighter/api/candlestick_api.py
  • ✅ Updated API reference in README.md
  • ✅ Updated documentation in docs/CandlestickApi.md

Testing

Manually verified endpoints:

  • /api/v1/candlesticks returns 403
  • /api/v1/candles returns 200

Impact

This fix resolves HTTP 403 errors for all users attempting to download candlestick data via the SDK. No breaking changes to the Python API - the method names and signatures remain unchanged.

Note for Maintainers

This SDK appears to be auto-generated from OpenAPI spec. If you regenerate from a source spec file, please ensure the source spec is also updated to use /api/v1/candles.

References

The /api/v1/candlesticks endpoint was deprecated and now returns
HTTP 403 Forbidden. This update migrates to the current /api/v1/candles
endpoint which is documented and functional.

Evidence:
- Old endpoint: https://mainnet.zklighter.elliot.ai/api/v1/candlesticks → HTTP 403
- New endpoint: https://mainnet.zklighter.elliot.ai/api/v1/candles → HTTP 200
- Old docs: https://apidocs.lighter.xyz/reference/candlesticks → 404
- New docs: https://apidocs.lighter.xyz/reference/candles → Active

Changes:
- Updated OpenAPI specification (openapi.json)
- Updated CandlestickApi endpoint URL (/candlesticks → /candles)
- Updated README.md API reference table
- Updated docs/CandlestickApi.md documentation

This fix resolves HTTP 403 errors when attempting to retrieve
candlestick data via the SDK.

Tested against: https://mainnet.zklighter.elliot.ai
API Docs: https://apidocs.lighter.xyz/reference/candles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant