TypeScript
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
maker: '<string>',
makerSrcOrToken: '<string>',
params: {
makerTraits: {
allowMultipleFills: true,
allowPartialFills: true,
allowedSenderSuffix: '<string>',
expiration: 1,
hasExtension: true,
needCheckEpochManager: true,
needPostInteractionCall: true,
needPreInteractionCall: true,
nonceOrEpoch: 1,
series: 1,
unwrapWeth: true,
usePermit2: true
},
makingAmount: '<string>',
salt: '<string>',
signature: '<string>',
takingAmount: '<string>',
extension: '<string>'
},
takerSrcOrToken: '<string>'
})
};
fetch('https://swap.ggp.gg/api/{blockchain}/order', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://swap.ggp.gg/api/{blockchain}/order \
--header 'Content-Type: application/json' \
--data '
{
"maker": "<string>",
"makerSrcOrToken": "<string>",
"params": {
"makerTraits": {
"allowMultipleFills": true,
"allowPartialFills": true,
"allowedSenderSuffix": "<string>",
"expiration": 1,
"hasExtension": true,
"needCheckEpochManager": true,
"needPostInteractionCall": true,
"needPreInteractionCall": true,
"nonceOrEpoch": 1,
"series": 1,
"unwrapWeth": true,
"usePermit2": true
},
"makingAmount": "<string>",
"salt": "<string>",
"signature": "<string>",
"takingAmount": "<string>",
"extension": "<string>"
},
"takerSrcOrToken": "<string>"
}
'import requests
url = "https://swap.ggp.gg/api/{blockchain}/order"
payload = {
"maker": "<string>",
"makerSrcOrToken": "<string>",
"params": {
"makerTraits": {
"allowMultipleFills": True,
"allowPartialFills": True,
"allowedSenderSuffix": "<string>",
"expiration": 1,
"hasExtension": True,
"needCheckEpochManager": True,
"needPostInteractionCall": True,
"needPreInteractionCall": True,
"nonceOrEpoch": 1,
"series": 1,
"unwrapWeth": True,
"usePermit2": True
},
"makingAmount": "<string>",
"salt": "<string>",
"signature": "<string>",
"takingAmount": "<string>",
"extension": "<string>"
},
"takerSrcOrToken": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"orderHash": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}{
"code": 400,
"error": "string"
}{
"code": 408,
"error": "string"
}{
"code": 500,
"error": "string"
}Order
Post api order
POST create order
POST
/
api
/
{blockchain}
/
order
TypeScript
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
maker: '<string>',
makerSrcOrToken: '<string>',
params: {
makerTraits: {
allowMultipleFills: true,
allowPartialFills: true,
allowedSenderSuffix: '<string>',
expiration: 1,
hasExtension: true,
needCheckEpochManager: true,
needPostInteractionCall: true,
needPreInteractionCall: true,
nonceOrEpoch: 1,
series: 1,
unwrapWeth: true,
usePermit2: true
},
makingAmount: '<string>',
salt: '<string>',
signature: '<string>',
takingAmount: '<string>',
extension: '<string>'
},
takerSrcOrToken: '<string>'
})
};
fetch('https://swap.ggp.gg/api/{blockchain}/order', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://swap.ggp.gg/api/{blockchain}/order \
--header 'Content-Type: application/json' \
--data '
{
"maker": "<string>",
"makerSrcOrToken": "<string>",
"params": {
"makerTraits": {
"allowMultipleFills": true,
"allowPartialFills": true,
"allowedSenderSuffix": "<string>",
"expiration": 1,
"hasExtension": true,
"needCheckEpochManager": true,
"needPostInteractionCall": true,
"needPreInteractionCall": true,
"nonceOrEpoch": 1,
"series": 1,
"unwrapWeth": true,
"usePermit2": true
},
"makingAmount": "<string>",
"salt": "<string>",
"signature": "<string>",
"takingAmount": "<string>",
"extension": "<string>"
},
"takerSrcOrToken": "<string>"
}
'import requests
url = "https://swap.ggp.gg/api/{blockchain}/order"
payload = {
"maker": "<string>",
"makerSrcOrToken": "<string>",
"params": {
"makerTraits": {
"allowMultipleFills": True,
"allowPartialFills": True,
"allowedSenderSuffix": "<string>",
"expiration": 1,
"hasExtension": True,
"needCheckEpochManager": True,
"needPostInteractionCall": True,
"needPreInteractionCall": True,
"nonceOrEpoch": 1,
"series": 1,
"unwrapWeth": True,
"usePermit2": True
},
"makingAmount": "<string>",
"salt": "<string>",
"signature": "<string>",
"takingAmount": "<string>",
"extension": "<string>"
},
"takerSrcOrToken": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"orderHash": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}{
"code": 400,
"error": "string"
}{
"code": 408,
"error": "string"
}{
"code": 500,
"error": "string"
}Path Parameters
Available options:
ethereum, bsc, arbitrum Body
application/json
Order params with signatures and extensions
Maker wallet or contract address
Address of the maker asset (ERC20 token contract)
Order type
Available options:
limit, twap Limit order params
Show child attributes
Show child attributes
Address of the taker asset (ERC20 token contract)
Other destination wallet or contract
Response
Success creation order with orderHash
Order hash (id in bytes32)
⌘I