Prepare the transfer’s native-USDC conversion
curl --request POST \
--url https://api.lamarge.trade/v1/transfers/{id}/conversion/prepare \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.lamarge.trade/v1/transfers/{id}/conversion/prepare', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lamarge.trade/v1/transfers/{id}/conversion/prepare"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"amount_in": "<string>",
"min_out": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"chain_id": 123,
"escrow": "<string>",
"payer": "<string>",
"converter": "<string>",
"token": "<string>",
"nonce": "<string>",
"deadline": "<string>",
"prepared_block": 123,
"state": "prepared",
"attempts": [
"<string>"
],
"tx_hash": "<string>",
"received": "<string>",
"block_number": 123
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true,
"reason": "<string>",
"venue": "<string>",
"step": "permit"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true,
"reason": "<string>",
"venue": "<string>",
"step": "permit"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true,
"reason": "<string>",
"venue": "<string>",
"step": "permit"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true,
"reason": "<string>",
"venue": "<string>",
"step": "permit"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true,
"reason": "<string>",
"venue": "<string>",
"step": "permit"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true,
"reason": "<string>",
"venue": "<string>",
"step": "permit"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true,
"reason": "<string>",
"venue": "<string>",
"step": "permit"
}
}Transfers
Prepare the transfer’s native-USDC conversion
For a transfer with conversion: the payer’s own Polygon transaction converting native USDC into its available pUSD, valid 30 minutes. Retries, and replacement transfers naming its id, return it, also after access is withdrawn; another is refused while it is unresolved: never prepare one to recover an unknown broadcast. Take once it is ready, which only the finalized escrow event sets.
POST
/
v1
/
transfers
/
{id}
/
conversion
/
prepare
Prepare the transfer’s native-USDC conversion
curl --request POST \
--url https://api.lamarge.trade/v1/transfers/{id}/conversion/prepare \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.lamarge.trade/v1/transfers/{id}/conversion/prepare', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lamarge.trade/v1/transfers/{id}/conversion/prepare"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"amount_in": "<string>",
"min_out": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"chain_id": 123,
"escrow": "<string>",
"payer": "<string>",
"converter": "<string>",
"token": "<string>",
"nonce": "<string>",
"deadline": "<string>",
"prepared_block": 123,
"state": "prepared",
"attempts": [
"<string>"
],
"tx_hash": "<string>",
"received": "<string>",
"block_number": 123
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true,
"reason": "<string>",
"venue": "<string>",
"step": "permit"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true,
"reason": "<string>",
"venue": "<string>",
"step": "permit"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true,
"reason": "<string>",
"venue": "<string>",
"step": "permit"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true,
"reason": "<string>",
"venue": "<string>",
"step": "permit"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true,
"reason": "<string>",
"venue": "<string>",
"step": "permit"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true,
"reason": "<string>",
"venue": "<string>",
"step": "permit"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true,
"reason": "<string>",
"venue": "<string>",
"step": "permit"
}
}Authorizations
Response
The conversion.