You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/order-book/README.md
+33Lines changed: 33 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -121,6 +121,39 @@ const orderBookApi = new OrderBookApi({
121
121
})
122
122
```
123
123
124
+
### Partner API (Authenticated Access)
125
+
126
+
Partners can use the Partner API for authenticated, rate-limited access with higher request quotas. Provide your API key and the SDK will automatically route requests through the partner gateway and attach the `X-API-Key` header.
127
+
128
+
| Environment | Partner API Base URL |
129
+
|-------------|---------------------|
130
+
| Production |`https://partners.cow.fi`|
131
+
| Staging |`https://partners.barn.cow.fi`|
132
+
133
+
```typescript
134
+
const orderBookApi =newOrderBookApi({
135
+
chainId: SupportedChainId.MAINNET,
136
+
apiKey: 'your-partner-api-key',
137
+
})
138
+
```
139
+
140
+
To use the Partner API with the Trading SDK, pass a configured `OrderBookApi` instance:
> **Tip:** Use `utmContent` for graffiti without affecting your `appCode`. The `appCode` parameter tracks your integration on [CoW Protocol's Dune dashboards](https://dune.com/cowprotocol/cowswap), while `utmContent` is available for custom identifiers or experimentation - all while attributing your volume to SDK integrators' collective impact.
279
279
280
280
281
+
## Partner API
282
+
283
+
Partners can use authenticated API access with higher rate limits via the Partner API gateway. Pass your API key when creating an `OrderBookApi` instance:
By default, the SDK routes requests through `partners.cow.fi` (prod) or `partners.barn.cow.fi` (staging) and includes the `X-API-Key` header. If you provide custom `baseUrls`, those take precedence over the default partner hosts, but the `X-API-Key` header is still sent with every request.
295
+
296
+
See the [OrderBookApi documentation](https://github.com/cowprotocol/cow-sdk/tree/main/packages/order-book/README.md#partner-api-authenticated-access) for more details, including usage with the Trading SDK.
297
+
281
298
## Adapters
282
299
283
300
The CoW SDK supports multiple blockchain adapters to work with different Web3 libraries. You need to install and configure one of the following adapters:
0 commit comments