mirror of
https://github.com/luxfi/dex.git
synced 2026-09-24 00:26:31 +00:00
Lux Partners Limited is not the entity behind this work. Every place the old name stood — copyright lines, site footers, brand config, legal and compliance text — now names the company that actually holds it. lux.fund is the exception and is not renamed to match: that site belongs to Lux Assets Management LLC, a different company, and it says so. Two kinds of line were left for a person rather than rewritten. A dated news item recording that Lux Partners Limited was established in the Isle of Man is a historical fact, and renaming it would falsify the record. And a sentence asserting that the company is domiciled in the Isle of Man is a claim about a jurisdiction, not a name — an Inc or an LLC is not an Isle of Man company, so swapping the name there would assert something untrue. Co-authored-by: Hanzo Dev <[email protected]>
LX Hummingbot Gateway Plugin
Official Hummingbot Gateway plugin for LX.
Installation
Via npm
npm install hummingbot-gateway-lxdex-plugin
Manual Installation
- Clone the repository:
git clone https://github.com/luxfi/dex.git
cd dex/hummingbot-gateway/plugins/lxdex
- Install dependencies and build:
npm install
npm run build
- Link to your Gateway installation:
npm link
cd /path/to/hummingbot-gateway
npm link hummingbot-gateway-lxdex-plugin
Configuration
Copy the configuration file to your Gateway config directory:
cp config/lxdex.yml /path/to/hummingbot-gateway/conf/
Configuration Options
Edit conf/lxdex.yml to customize:
- Network endpoints: API, WebSocket, gRPC URLs
- Trading parameters: Slippage, max hops, quote expiration
- Gas settings: Gas limit, price source
- Rate limits: Requests per second
- WebSocket: Auto-reconnect, ping intervals
Usage
Register with Gateway
In your Gateway startup file:
import { FastifyInstance } from 'fastify';
import { lxdexPlugin } from 'hummingbot-gateway-lxdex-plugin';
async function start(fastify: FastifyInstance) {
// Register LX plugin
await fastify.register(lxdexPlugin);
await fastify.listen({ port: 15888 });
}
Test Endpoints
# Health check
curl http://localhost:15888/lxdex/health
# Get swap quote
curl "http://localhost:15888/lxdex/router/quote-swap?baseToken=LUX"eToken=USDC&amount=1000000000000000000&side=SELL"
# Get trading pairs
curl http://localhost:15888/lxdex/pairs
Supported Trading Operations
| Schema | Endpoint Prefix | Operations |
|---|---|---|
| Router | /lxdex/router |
Quote swap, Execute swap |
| AMM | /lxdex/amm |
Pool info, Add/Remove liquidity |
| CLMM | /lxdex/clmm |
Open/Close positions, Collect fees |
| OrderBook | /lxdex |
Place/Cancel orders, Order book |
Links
License
Apache-2.0