-
Notifications
You must be signed in to change notification settings - Fork 546
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
46 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
id: webhooks | ||
title: Webhook Support | ||
sidebar_position: 3 | ||
--- | ||
|
||
# Signed Order Webhook Notifications | ||
|
||
Signed open orders can always be fetched via the UniswapX API, but to provide improved latency there is the option to register for webhook notifications. Fillers can register an endpoint and receive notifications for every newly posted order that matches their desired filter. | ||
|
||
## Notifications | ||
|
||
Order notifications will be sent to the registered endpoint as http requests as follows: | ||
|
||
```jsx | ||
method: POST | ||
content-type: application/json | ||
data: { | ||
orderHash: "the hash identifier for the order", | ||
createdAt: "timestamp at which the order was posted", | ||
signature: "the swapper signature to include with order execution", | ||
orderStatus: "current order status (always should be `open` upon receiving notification)", | ||
encodedOrder: "The abi-encoded order to include with order execution. This can be decoded using the Uniswapx-SDK (https://github.com/uniswap/uniswapx-sdk) to verify order fields and signature", | ||
chainId: "The chain ID that the order originates from and must be settled on", | ||
filler?: "If this order was quoted by an RFQ participant then this will be their filler address", | ||
quoteId?: "If this order was quoted by an RFQ participant then this will be the requestId from the quote request", | ||
swapper?: "The swapper address", | ||
type?: "The order type (e.g. 'Dutch_V2', 'Limit', etc)" | ||
} | ||
``` | ||
|
||
## Filtering | ||
Orders can be filtered by various fields. For quoters, the most common use case is to filter to their address so they are notified immediately of won bids. Alternatively the webhook can be configured to send all open orders to your endpoint. | ||
|
||
|
||
## Request a Webhook | ||
To register your webhook endpoint, please reach out in [UniswapX Fillers - Discussion](https://t.me/uniswapx_fillers_discussion). | ||
|