You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a deal with OKX on the horizon which would require an integration with their API.
Given that they also have an endpoint that returns calldata for a given trade it should be mostly a matter of copy and pasting the structure of one of the existing solver (e.g. 1inch) and having DTOs specific to their endpoint (meaning DTOs tailor made for their request and response JSONs).
The text was updated successfully, but these errors were encountered:
# Description
OKX dex integration.
See also dedicated issue: #93
# Changes
Added new `okx` modules in `dex`, `config` and `tests`.
Created dto basing on documentation:
https://www.okx.com/en-au/web3/build/docs/waas/dex-swap.
OKX requires signing of swap request, it is implemented in function:
`sign_request()`, basing on documentation:
https://www.okx.com/en-au/web3/build/docs/waas/rest-authentication#signature
Also implemented custom error handling function: `handle_api_error()`,
as OKX in error cases returns valid json http body which causes that
trait implementation from `RoundtripError` to `dto::Error` is not used.
## How to test
Created dedicated tests which uses http mocking and real endpoint tests
(ignored) which requires providing API credentials. If API credentials
are needed for running ignored test I can provide that.
There is a deal with
OKX
on the horizon which would require an integration with their API.Given that they also have an endpoint that returns calldata for a given trade it should be mostly a matter of copy and pasting the structure of one of the existing solver (e.g. 1inch) and having DTOs specific to their endpoint (meaning DTOs tailor made for their request and response JSONs).
The text was updated successfully, but these errors were encountered: