...
Code Block |
---|
mutation {
getSwapQuote(
serviceId: String!,
marketId: String!,
from: String!,
to: String!,
# direction can be 'to' or 'from'
direction: String!,
amount: String!
): SwapQuote
} |
...
Code Block |
---|
mutation { swapQuote( from: "USDT", to: "ETH", marketId: "ETH-USDT", serviceId: "WHITEBIT", direction: "from", amount: "100" ) { id serviceId from to direction amount give receive rate internalGive internalReceive expireAt status isActive isErrored } } |
...
Code Block |
---|
mutation {
swapQuote(
from: "USDT",
to: "ETH",
marketId: "ETH-USDT",
serviceId: "WHITEBIT",
direction: "to",
amount: "0.001"
) {
id
serviceId
from
to
direction
amount
give
receive
rate
internalGive
internalReceive
expireAt
status
isActive
isErrored
}
} |
...
Code Block |
---|
mutation {
confirmSwapQuote(id: String!, serviceId: String!, marketId: String!): SwapQuote
} |
Передаем id квоты, serviceId, marketId
...