Optimization of DEX Swap software (OKX DEX API)
Refactoring and optimization of the application for working with OKX DEX API. The current code works, but uses suboptimal routing, requires manual handling of decimals, and lacks auto-approval.
Technology:
If Node.js - implement as a REST API
If Python - implement as a module
2. REQUIREMENTS
2.1 Optimal routing
Use OKX DEX API to find the best route among 400+ DEXs
Automatically select the route with the best price and minimal slippage
Example: USDC → 0x1C4CcA7C5DB003824208aDDA61Bd749e55F463a3 on Base should automatically find the optimal path
2.2 Automatic handling of decimals
The user inputs the actual amount of tokens (for example, 100)
The software automatically converts to base units and back
Decimals are obtained from the API and cached
2.3 Auto-approval
Before the swap, automatically check allowance
If insufficient - automatically send approve transaction
After successful approval, perform the swap
2.4 Code cleanup
Remove dead code and unnecessary parts
Separate into logical functions/modules
Add proper error handling
Use async/await
3. FORMAT
Node.js: REST API endpoints for obtaining quotes and performing swaps. Works on all networks (chainIndex is passed in the request)
Python: Module for importing into other projects. Works on all networks (chainIndex is passed as a parameter)
4. DOCUMENTATION
README with usage examples
Example on Base network
Description of all functions/endpoints and parameters
Applications 1
Client's review of cooperation with Matvii Lipnevsky
Optimization of DEX Swap software (OKX DEX API)Matvey quickly understood the project, everything worked out clearly. The deadlines were met faster than stated. I recommend him as a performer!
Freelancer's review of cooperation with Maria Egorova
Optimization of DEX Swap software (OKX DEX API)The client clearly described the terms of reference and was always in touch. Thank you for the cooperation!
-
2930 8 0 1 Hello 👋
I have experience working with DEX API (including OKX, 1inch, Jupiter, Raydium) and route optimization for swaps. I am ready to perform a complete refactoring and optimization of your solution with a focus on stability, performance, and clean architecture.
What I will do:
I will optimize routing through OKX DEX API — automatically finding the best path from 400+ DEX;
I will implement correct handling of decimals — automatic conversion and caching of data;
I will add auto-approval before the swap (approve + swap in one cycle);
Complete code cleanup, logical structure, error handling, async/await;
README with examples and instructions (Base network + general examples).
…
I can implement it as a REST API on Node.js or as a Python module — according to your current stack.
-
1182 8 1 Hello, Maria Egorova
I have experience working with and debugging crooked decks and refactoring code.
Please write in private messages to discuss the deadline.
-
297 1 Hello.
Your project focuses on refactoring and optimizing an application that interacts with the OKX DEX API to provide smarter routing, automated handling of decimals, and seamless approval management. I will restructure the logic using modular, clean, and well-structured Node.js (or Python) code, integrating efficient asynchronous/await flows and robust error handling. The system will automatically retrieve decimals, select the best exchange route among over 400 DEXs, and manage approvals before transactions. I will also provide clear documentation and usage examples, ensuring full support and scalability of the solution.
-
172 1 1 Hello! I am ready to complete this project and have extensive experience in developing various applications.
-
981 6 3 Good day, I am ready to complete it. Write in private messages, it will be of high quality and fast!
-
142 Good day, I can do everything with quality, write to me. I will do everything very quickly.
Current freelance projects in the category Cryptocurrency & Blockchain
Audit and construction of a secure infrastructure for sending BTC transactions
601 USD
We are looking for a Bitcoin security engineer for two tasks: (1) auditing the current wallet generation and BTC sending system to identify vulnerabilities; (2) designing and building a new secure infrastructure for key storage and transaction sending.Part 1 — Audit of the… System & Network Administration, Cryptocurrency & Blockchain ∙ 6 days 20 hours back ∙ 10 proposals |
Need Smart Contract Engineer/Mentor
8000 USD
I want to find the Smart Contract Engineer/Mentor who has rich experience in Solidity smart contract development. Cryptocurrency & Blockchain, Engineering ∙ 13 days 16 hours back ∙ 12 proposals |