TGViewer
CCXT Announcements CCXT Announcements @ccxt_announcements · 840 subscribers
Post #107 795
Hello, CCXT community! 👋

We are happy to announce and integration of the Lighter exchange in CCXT.

It works similarly to any other CCXT exchange, but it has some particularities that might be confusing for some users but we will explain it in detail.


Credentials requirements

Lighter requires the following :
- privateKey: the API key private key (hex) from Lighter’s API keys page, not the l1 privateKey (https://app.lighter.xyz/apikeys)
- apiKeyIndex in exchange.options: the index assigned to the API key you generated (typically 0–254) you can get it from the API Keys page as well
- accountIndex in exchange.options: — the Lighter internal account index (master account or sub-account). Each internal account has its own API key indices. You can checking by opening this link in the browser using your l1 address https://mainnet.zklighter.elliot.ai/api/v1/accountsByL1Address?l1_address=0xYOUR_ADDRESS_here

Example

lighter = ccxt.lighter({
'privateKey': 'XXXXXXX',
'options': {
'apiKeyIndex': 3,
'accountIndex': 715085
}
})


Dependencies requirements

Since the signing algorithms and structs are not supported natively in all languages CCXT is using the officially distributed binaries and interacting with them in order to do the signing process (via FFI/WASM), so depending on the language you need to provide a path for that binary.

Python/C#/PHP users:

- The binaries can be downloaded here: https://github.com/elliottech/lighter-python/tree/main/lighter/signers
- The path to the binary needs to be provided as libraryPath
- You need to choose the binary according to your OS/architecture (macos/linux/window and arm64 or amd64)

lighter = ccxt.lighter({
'options': {
'libraryPath': 'path/to/lighter-signer-linux-arm64.so',
}
})


Javascript/Typescript users

- CCXT is using the WASM binary built from the official package and it can be downloaded here https://github.com/ccxt/lighter-wasm or built from the source
- You also need to provide the path to exec_wasm.js, you can either download it from the same repo or check the path to your local file (assuming Go is installed)

lighter = ccxt.lighter({
'options': {
'libraryPath': '/user/cjg/Git/lighter-wasm/lighter.wasm',
'wasmExecPath': '/opt/homebrew/opt/go/libexec/lib/wasm/wasm_exec.js'
}
})


GO users

- Nothing is required, CCXT is consuming the official GO package you just need to provide the credentials


If you need help or encounter any difficulties during the process, the CCXT team is ready to assist you.

Detailed instructions: https://github.com/ccxt/ccxt/wiki/FAQ#how-to-use-the-lighter-exchange-in-ccxt

This exchange is available in CCXT as of version 4.5.41. 🚀

Congrats, and welcome on board!
Yours, the CCXT Dev Team ✅
app.lighter.xyz Lighter - Trade perpetuals with unmatched efficiency and security
  • 👍 10
  • ❤ 5
More from @ccxt_announcements
  1. Sep 19, 2026📘 4.5.81 released! Upgrade now to take advantage of: 🔧 Updates & Fixes: Upgrade to v4.5.…
  2. Sep 17, 2026🇸🇬 CCXT is coming to TOKEN2049 Singapore! We’d love to meet members of the CCXT communit…
  3. Sep 14, 2026Hello, CCXT community! 👋 🚀 Introducing ccxt-mcp — the official CCXT MCP server Give your…
  4. Sep 7, 2026Hello, CCXT community! 👋 We're excited to announce the public release of the Rust version…
  5. Sep 4, 2026⏰ Last call — registration closes Monday The BTSE × CCXT Trading Competition registration…
  6. Sep 1, 2026Hello, CCXT community! 👋 We are happy to announce the integration of the Revolut X exchan…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →