Update a Trade
PATCH/v3/trades/:idDescription
This endpoint allows you to update a Trade, particularly to set the transaction id that was broadcasted for the swap. This also allows you to set an error that happened when broadcasting the transaction.
Header Parameters
Name | Description | Required |
---|---|---|
App-Name | App-Name for the authorization | yes |
App-Version | App-Version for the authorization | no |
Forwarded | If you are proxying requests to the API, you must include the "Forwarded" header with the original request IP address. This is used for geolocation availability purposes. | no |
Payload
TransactionId
Name | Description | Required |
---|---|---|
transactionId | The transaction id broadcasted. | yes |
Error
Name | Description | Required |
---|---|---|
error | The error you want to attach to the trade | yes |
Response
SUCCESSFULL SWAP CREATION
{
"id": "cc28c4d790dbf6e8109cbddca68e42406657d4d4a225f2b49a179fc52bead6bb",
"pairId": "SOL_USDCSOL",
"fromAmount": {
"assetId": "SOL",
"value": "1"
},
"toAmount": {
"assetId": "USDCSOL",
"value": "152.54"
},
"slippage": 2,
"swapMode": "ExactIn",
"provider": "jup-sol",
"expiry": 1752515834195,
"fee": {
"amount": {
"assetId": "SOL",
"value": "0.004575179"
}
},
"solanaTransactions": [
{
"type": "swap",
"data": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAQAGC57KE+vXZRw4+Zn6KkR0n2JXRLu7UwfoB/jo+90eHBzOAIc4pdz1sXQ22Pv1i4BSXOlSLQLcDhMMxqv/ke2kphQkdbrsCdC/ZQn00fd0L66V9xmhpJfdP72OADSNGdee4VGXpdGcB3C0k3pGFRKaIwNm+8RsbVBU2IdzvEjKu7nn/GO7kCFV3KETKMQ3uJJZHbF5IMxRKI6r7cWH9BmLRZ0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMGRm/lIRcy/+ytunLDm+e8jOW7xfcSayxDmzpAAAAABHnVW/IxwG7udMVuzmgVB/2xst6j9I5RArHNola8E48G3fbh12Whk9nL4UbO63msHLSF7V9bN5E6jPWFfv8AqYyXJY9OJInxuz0QKRSODYMLWhOZ2v8QhASOe9jb6fhZtD/6J/XX9kp0wJsfKVh53ksJqzbfyd1RSzIap7OM5ehRbyOCzJvl/z5eW5HF7yLdbh1gUWRGCfz1+2R2qkfWswgGAAUCwFwVAAYACQParQIAAAAAAAkGAAIAEwUIAQEFAgACDAIAAAAAypo7AAAAAAgBAgERCQYABAAVBRQBAQccFAACBAcVAwoHFwAWEQIEEA8OCBQSExUNAQwLByPlF8uXeuOtKgEAAAAoZAABAMqaOwAAAADMkU0EBwAAAMgAVQgDAgAAAQkBBe6HEwbmt+rEKxKbcHFgc9myVmFXjSn1GxHGyukf444HWh8kIycmIgY6ERQhKBM="
}
],
"transactionId": "5dqk2KJjJzgZt9uvqnHGRL4LKtLRCNfzvsd4hmHt4V8Z7tVenpYB2r8JrHBUZzajMWtv6jp1dJJTPPpdgoaGYr49"
}
Last updated on