Get the exchange amount in Protocol Tokens for entered Pegged Tokens.
Sample Request Sample Response
Copy https://api.expand.network/synthetic/getprice?amount=58798
Copy {
"status": 200,
"msg": "success",
"data": {
"peggedToProtocolToken": "22177"
}
}
Deposit pegged token.
Sample Request Sample Response
Copy {
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"amount": "100000000000000000",
"gas": "300000",
"syntheticId": "6000"
}
Copy {
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"value": "0",
"gas": "300000",
"data": "0xdc8fa6c2000000000000000000000000000000000000000000000000016345785d8a0000",
"to": "0xE1f64079aDa6Ef07b03982Ca34f1dD7152AA3b86"
}
}
Sample Request Sample Response
With gasPriority:
Copy {
"from": "0x731FDBd6871aD5cD905eE560A84615229eD8197a",
"amount": "100000",
"gas": "300000",
"syntheticId": "6000",
"gasPriority": "medium"
}
With gasPriority:
Copy {
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x731FDBd6871aD5cD905eE560A84615229eD8197a",
"value": "0",
"gas": "300000",
"data": "0xdc8fa6c200000000000000000000000000000000000000000000000000000000000186a0",
"to": "0xE1f64079aDa6Ef07b03982Ca34f1dD7152AA3b86",
"gasPrice": "17327449829"
}
}
Sample Request Sampe Response
With ofacCheck:
Copy {
"from": "0x731FDBd6871aD5cD905eE560A84615229eD8197a",
"amount": "100000",
"gas": "300000",
"syntheticId": "6000",
"gasPriority": "medium",
"ofacCheck": true
}
With ofacCheck:
Copy {
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
"to": "0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b",
"value": "0",
"gas": "40000",
"data": "0xede4edd00000000000000000000000005d3a536e4d6dbd6114cc1ead35777bab948e3643",
"gasPrice": "499498318",
"estimationCheck": true,
"insights": {
"asset": {
"issues": [],
"verdict": {
"code": 0,
"label": "NO_ISSUES"
}
},
"to": {
"issues": [],
"verdict": {
"code": 0,
"label": "NO_ISSUES"
}
}
},
"referenceId": "e9bfe6229a844227a92a2f6669aa1da0"
}
}
Withdraw pegged token.
Sample Request Sample Response
Copy {
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"gas": "300000",
"syntheticId": "6000"
}
Copy {
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"value": "0",
"gas": "300000",
"data": "0x81b797dc",
"to": "0xE1f64079aDa6Ef07b03982Ca34f1dD7152AA3b86"
}
}
Sample Request Sample Response
With gasPriority:
Copy {
"from": "0x731FDBd6871aD5cD905eE560A84615229eD8197a",
"gas": "300000",
"syntheticId": "6000",
"gasPriority": "medium"
}
With gasPriority:
Copy {
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x731FDBd6871aD5cD905eE560A84615229eD8197a",
"value": "0",
"gas": "300000",
"data": "0x81b797dc",
"to": "0xE1f64079aDa6Ef07b03982Ca34f1dD7152AA3b86",
"gasPrice": "16948048970"
}
}
Sample Request Sampe Response
With ofacCheck:
Copy {
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"gas": "300000",
"syntheticId": "6000",
"ofacCheck": true
}
With ofacCheck:
Copy {
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
"to": "0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b",
"value": "0",
"gas": "40000",
"data": "0xede4edd00000000000000000000000005d3a536e4d6dbd6114cc1ead35777bab948e3643",
"gasPrice": "499498318",
"estimationCheck": true,
"insights": {
"asset": {
"issues": [],
"verdict": {
"code": 0,
"label": "NO_ISSUES"
}
},
"to": {
"issues": [],
"verdict": {
"code": 0,
"label": "NO_ISSUES"
}
}
},
"referenceId": "e9bfe6229a844227a92a2f6669aa1da0"
}
}