cURL
curl --request POST \ --url https://unidexv4-api-production.up.railway.app/api/crosschaindeposit \ --header 'Content-Type: application/json' \ --data '{ "userAddress": "<string>", "fromChainId": 123, "amount": "<string>", "tokenAddress": "<string>" }'
{ "needsApproval": true, "approvalCalldata": "<string>", "spenderAddress": "<string>" }
Deposit tokens from other chains into your margin wallet
curl -X POST "https://unidexv4-api-production.up.railway.app/api/crosschaindeposit" \ -H "Content-Type: application/json" \ -d '{ "userAddress": "0x1234567890123456789012345678901234567890", "fromChainId": 1, "amount": "1000.00", "tokenAddress": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" }'
{ "needsApproval": true, "approvalCalldata": "0x095ea7b3...", "spenderAddress": "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789" }
{ "calldata": "0x4d595245...", "routerAddress": "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789" }
Successful response
The response is of type object.
object