Synthetix
/getprice
Get the exchange amount in Protocol Tokens for entered Pegged Tokens.
GET
https://api.expand.network/synthetic/getprice
Query Parameters
https://api.expand.network/synthetic/getprice?amount=58798
{
"status": 200,
"msg": "success",
"data": {
"peggedToProtocolToken": "22177"
}
}
/depositpeggedtoken
Deposit pegged token.
POST
https://api.expand.network/synthetic/depositpeggedtoken
Request Body
{
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"amount": "100000000000000000",
"gas": "300000",
"syntheticId": "6000"
}
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"value": "0",
"gas": "300000",
"data": "0xdc8fa6c2000000000000000000000000000000000000000000000000016345785d8a0000",
"to": "0xE1f64079aDa6Ef07b03982Ca34f1dD7152AA3b86"
}
}
With gasPriority:
{
"from": "0x731FDBd6871aD5cD905eE560A84615229eD8197a",
"amount": "100000",
"gas": "300000",
"syntheticId": "6000",
"gasPriority": "medium"
}
With gasPriority:
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x731FDBd6871aD5cD905eE560A84615229eD8197a",
"value": "0",
"gas": "25474",
"data": "0xdc8fa6c200000000000000000000000000000000000000000000000000000000000186a0",
"to": "0x9B79D6dFe4650d70f35dbb80f7d1EC0Cf7f823Fd"
}
}
/withdrawpeggedtoken
Withdraw pegged token.
POST
https://api.expand.network/synthetic/withdrawpeggedtoken
Request Body
{
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"gas": "300000",
"syntheticId": "6000"
}
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"value": "0",
"gas": "300000",
"data": "0x81b797dc",
"to": "0xE1f64079aDa6Ef07b03982Ca34f1dD7152AA3b86"
}
}
With gasPriority:
{
"from": "0x731FDBd6871aD5cD905eE560A84615229eD8197a",
"gas": "300000",
"syntheticId": "6000",
"gasPriority": "medium"
}
With gasPriority:
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x731FDBd6871aD5cD905eE560A84615229eD8197a",
"value": "0",
"gas": "25277",
"data": "0x81b797dc000000000000000000000000000000000000000000000000000000000000731FDBd6871aD5cD905eE560A84615229eD8197a4650d70f35dbb80f7d1EC0Cf7f823Fd",
"to": "0x9B79D6dFe4650d70f35dbb80f7d1EC0Cf7f823Fd"
}
}