Skip to main content
POST
/
api
/
v1
/
evm-exchange
/
token-to-token
Swap one ERC20 token to another
curl --request POST \
  --url https://api.dev.monei.cc/api/v1/evm-exchange/token-to-token \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "tokenIn": "0xA0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
  "tokenOut": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
  "amount": "100",
  "chainId": 1
}
'
{
  "statusCode": 123,
  "message": "<string>",
  "data": {
    "txHash": "<string>"
  },
  "errors": {}
}

Authorizations

X-API-KEY
string
header
required

Body

application/json
tokenIn
string
required

Token address to swap from

Example:

"0xA0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"

tokenOut
string
required

Token address to swap to

Example:

"0xdAC17F958D2ee523a2206206994597C13D831ec7"

amount
string
required

Amount of tokenIn to swap

Example:

"100"

chainId
number
required

Chain ID (e.g., 1 for Ethereum)

Example:

1

Response

default - application/json
statusCode
number
required
message
string
required
data
object
required
errors
object
required