// Check guide https://docs.8dx.io/guide
const orderBody = prepareOrderForApi(order, signature, decodeMakerTraits(order.makerTraits));
const options = {
method: 'POST',
body: JSON.stringify(orderBody)
// ...
};
const blockchain = 'ethereum';
fetch(`https://swap.ggp.gg/api/${blockchain}/order`, options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"orderHash": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}POST create order
// Check guide https://docs.8dx.io/guide
const orderBody = prepareOrderForApi(order, signature, decodeMakerTraits(order.makerTraits));
const options = {
method: 'POST',
body: JSON.stringify(orderBody)
// ...
};
const blockchain = 'ethereum';
fetch(`https://swap.ggp.gg/api/${blockchain}/order`, options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"orderHash": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}ethereum, bsc, arbitrum Order params with signatures and extensions
Maker wallet or contract address
Address of the maker asset (ERC20 token contract)
Order type
limit, twap Limit order params
Show child attributes
Address of the taker asset (ERC20 token contract)
Other destination wallet or contract
Success creation order with orderHash
Order hash (id in bytes32)