Skip to content

Commit fd20dc7

Browse files
author
sam
committed
feat(api): sushiswap user api docs
1 parent 69b460f commit fd20dc7

13 files changed

Lines changed: 404 additions & 0 deletions

api/.openapi-generator-ignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# OpenAPI Generator Ignore
2+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
3+
4+
# Use this file to prevent files from being overwritten by the generator.
5+
# The patterns follow closely to .gitignore or .dockerignore.
6+
7+
# As an example, the C# client generator defines ApiClient.cs.
8+
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9+
#ApiClient.cs
10+
11+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
12+
#foo/*/qux
13+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14+
15+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16+
#foo/**/qux
17+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18+
19+
# You can also negate patterns with an exclamation (!).
20+
# For example, you can ignore all files in a docs folder with the file extension .md:
21+
#docs/*.md
22+
# Then explicitly reverse the ignore rule for a single file:
23+
#!docs/README.md

api/.openapi-generator/VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
4.3.1

api/Apis/DefaultApi.md

Lines changed: 216 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,216 @@
1+
# DefaultApi
2+
3+
All URIs are relative to *https://sushi.backbonecabal.xyz*
4+
5+
| Method | HTTP request | Description |
6+
| -------------------------------------------------------------------------- | -------------------------------------- | ----------------------------------------------------- |
7+
| [**apiV1OrdersGet**](DefaultApi.md#apiV1OrdersGet) | **GET** /api/v1/orders | Get existing orders. |
8+
| [**apiV1OrdersPost**](DefaultApi.md#apiV1OrdersPost) | **POST** /api/v1/orders | Create a new order. |
9+
| [**apiV1OrdersUIDDelete**](DefaultApi.md#apiV1OrdersUIDDelete) | **DELETE** /api/v1/orders/{UID} | Cancels order by marking it invalid with a timestamp. |
10+
| [**apiV1OrdersUIDGet**](DefaultApi.md#apiV1OrdersUIDGet) | **GET** /api/v1/orders/{UID} | Get existing order from UID. |
11+
| [**apiV1SolvableOrdersGet**](DefaultApi.md#apiV1SolvableOrdersGet) | **GET** /api/v1/solvable_orders | Get solvable orders. |
12+
| [**apiV1TokensSellTokenFeeGet**](DefaultApi.md#apiV1TokensSellTokenFeeGet) | **GET** /api/v1/tokens/{sellToken}/fee |
13+
| [**apiV1TradesGet**](DefaultApi.md#apiV1TradesGet) | **GET** /api/v1/trades | Get existing Trades. |
14+
15+
<a name="apiV1OrdersGet"></a>
16+
17+
# **apiV1OrdersGet**
18+
19+
> List apiV1OrdersGet(owner, sellToken, buyToken, includeFullyExecuted, includeInvalidated, includeInsufficientBalance, minValidTo)
20+
21+
Get existing orders.
22+
23+
By default all currently valid orders are returned. The set of returned orders can be reduced by setting owner, sell token, buy token filters. It can be increased by disabling different order validity exclusion criteria.
24+
25+
### Parameters
26+
27+
| Name | Type | Description | Notes |
28+
| ------------------------------ | ----------- | -------------------------------------------------------------------------------- | ----------------------------- |
29+
| **owner** | **String** | Ethereum 40 byte address encoded as a hex with &#x60;0x&#x60; prefix. | [optional] [default to null] |
30+
| **sellToken** | **String** | Ethereum 40 byte address encoded as a hex with &#x60;0x&#x60; prefix. | [optional] [default to null] |
31+
| **buyToken** | **String** | Ethereum 40 byte address encoded as a hex with &#x60;0x&#x60; prefix. | [optional] [default to null] |
32+
| **includeFullyExecuted** | **Boolean** | Should fully executed orders be returned? | [optional] [default to false] |
33+
| **includeInvalidated** | **Boolean** | Should orders that have been invalidated in the smart contract be returned? | [optional] [default to false] |
34+
| **includeInsufficientBalance** | **Boolean** | Should fill or kill orders that are not sufficiently funded be included? | [optional] [default to false] |
35+
| **minValidTo** | **Integer** | Minimum valid_to timestamp for included orders. The default is the current time. | [optional] [default to null] |
36+
37+
### Return type
38+
39+
[**List**](..//Models/Order.md)
40+
41+
### Authorization
42+
43+
No authorization required
44+
45+
### HTTP request headers
46+
47+
- **Content-Type**: Not defined
48+
- **Accept**: application/json
49+
50+
<a name="apiV1OrdersPost"></a>
51+
52+
# **apiV1OrdersPost**
53+
54+
> String apiV1OrdersPost(body)
55+
56+
Create a new order.
57+
58+
### Parameters
59+
60+
| Name | Type | Description | Notes |
61+
| -------- | ------------------------------------------------ | -------------------- | ----- |
62+
| **body** | [**OrderCreation**](..//Models/OrderCreation.md) | The order to create. |
63+
64+
### Return type
65+
66+
[**String**](..//Models/string.md)
67+
68+
### Authorization
69+
70+
No authorization required
71+
72+
### HTTP request headers
73+
74+
- **Content-Type**: application/json
75+
- **Accept**: application/json
76+
77+
<a name="apiV1OrdersUIDDelete"></a>
78+
79+
# **apiV1OrdersUIDDelete**
80+
81+
> apiV1OrdersUIDDelete(uID, body)
82+
83+
Cancels order by marking it invalid with a timestamp.
84+
85+
The successful deletion might not prevent solvers from settling the order Authentication must be provided by signing the following message:
86+
87+
### Parameters
88+
89+
| Name | Type | Description | Notes |
90+
| -------- | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------- |
91+
| **uID** | **String** | Unique identifier for the order: 56 bytes encoded as hex with &#x60;0x&#x60; prefix. Bytes 0 to 32 are the order digest, bytes 30 to 52 the owner address and bytes 52..56 valid to, | [default to null] |
92+
| **body** | [**OrderCancellation**](..//Models/OrderCancellation.md) | Signed OrderCancellation |
93+
94+
### Return type
95+
96+
null (empty response body)
97+
98+
### Authorization
99+
100+
No authorization required
101+
102+
### HTTP request headers
103+
104+
- **Content-Type**: application/json
105+
- **Accept**: Not defined
106+
107+
<a name="apiV1OrdersUIDGet"></a>
108+
109+
# **apiV1OrdersUIDGet**
110+
111+
> List apiV1OrdersUIDGet(uID)
112+
113+
Get existing order from UID.
114+
115+
### Parameters
116+
117+
| Name | Type | Description | Notes |
118+
| ------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------- |
119+
| **uID** | **String** | Unique identifier for the order: 56 bytes encoded as hex with &#x60;0x&#x60; prefix. Bytes 0 to 32 are the order digest, bytes 30 to 52 the owner address and bytes 52..56 valid to, | [default to null] |
120+
121+
### Return type
122+
123+
[**List**](..//Models/Order.md)
124+
125+
### Authorization
126+
127+
No authorization required
128+
129+
### HTTP request headers
130+
131+
- **Content-Type**: Not defined
132+
- **Accept**: application/json
133+
134+
<a name="apiV1SolvableOrdersGet"></a>
135+
136+
# **apiV1SolvableOrdersGet**
137+
138+
> List apiV1SolvableOrdersGet()
139+
140+
Get solvable orders.
141+
142+
The set of orders that solvers should be solving right now. These orders are determined to be valid at the time of the request.
143+
144+
### Parameters
145+
146+
This endpoint does not need any parameter.
147+
148+
### Return type
149+
150+
[**List**](..//Models/Order.md)
151+
152+
### Authorization
153+
154+
No authorization required
155+
156+
### HTTP request headers
157+
158+
- **Content-Type**: Not defined
159+
- **Accept**: application/json
160+
161+
<a name="apiV1TokensSellTokenFeeGet"></a>
162+
163+
# **apiV1TokensSellTokenFeeGet**
164+
165+
> FeeInformation apiV1TokensSellTokenFeeGet(sellToken)
166+
167+
The fee that is charged for placing an order. The fee is described by a minimum fee - in order to cover the gas costs for onchain settling - and a feeRatio charged to the users for using the service.
168+
169+
### Parameters
170+
171+
| Name | Type | Description | Notes |
172+
| ------------- | ---------- | --------------------------------------------------------------------- | ----------------- |
173+
| **sellToken** | **String** | Ethereum 40 byte address encoded as a hex with &#x60;0x&#x60; prefix. | [default to null] |
174+
175+
### Return type
176+
177+
[**FeeInformation**](..//Models/FeeInformation.md)
178+
179+
### Authorization
180+
181+
No authorization required
182+
183+
### HTTP request headers
184+
185+
- **Content-Type**: Not defined
186+
- **Accept**: application/json
187+
188+
<a name="apiV1TradesGet"></a>
189+
190+
# **apiV1TradesGet**
191+
192+
> List apiV1TradesGet(owner, orderUid)
193+
194+
Get existing Trades.
195+
196+
By default all trades are returned. Queries can be refined by specifiying owner or order_uid.
197+
198+
### Parameters
199+
200+
| Name | Type | Description | Notes |
201+
| ------------ | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------- |
202+
| **owner** | **String** | Ethereum 40 byte address encoded as a hex with &#x60;0x&#x60; prefix. | [optional] [default to null] |
203+
| **orderUid** | **String** | Unique identifier for the order: 56 bytes encoded as hex with &#x60;0x&#x60; prefix. Bytes 0 to 32 are the order digest, bytes 30 to 52 the owner address and bytes 52..56 valid to, | [optional] [default to null] |
204+
205+
### Return type
206+
207+
[**List**](..//Models/Trade.md)
208+
209+
### Authorization
210+
211+
No authorization required
212+
213+
### HTTP request headers
214+
215+
- **Content-Type**: Not defined
216+
- **Accept**: application/json

api/Models/FeeInformation.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# FeeInformation
2+
3+
## Properties
4+
5+
| Name | Type | Description | Notes |
6+
| ------------------ | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- |
7+
| **expirationDate** | [**String**](string.md) | Expiration date of the offered fee. Order service might not accept the fee after this expiration date. Encoded as ISO 8601 UTC. | [optional] [default to null] |
8+
| **minimalFee** | [**String**](string.md) | Amount of a token. uint256 encoded in decimal. | [optional] [default to null] |
9+
| **feeRatio** | [**BigDecimal**](number.md) | The fee ratio charged on a sellAmount. Denoted in basis points | [optional] [default to null] |
10+
11+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

api/Models/Order.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Order
2+
3+
## Properties
4+
5+
| Name | Type | Description | Notes |
6+
| -------------------------------- | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------- |
7+
| **sellToken** | [**String**](string.md) | Ethereum 40 byte address encoded as a hex with &#x60;0x&#x60; prefix. | [optional] [default to null] |
8+
| **buyToken** | [**String**](string.md) | Ethereum 40 byte address encoded as a hex with &#x60;0x&#x60; prefix. | [optional] [default to null] |
9+
| **sellAmount** | [**String**](string.md) | Amount of a token. uint256 encoded in decimal. | [optional] [default to null] |
10+
| **buyAmount** | [**String**](string.md) | Amount of a token. uint256 encoded in decimal. | [optional] [default to null] |
11+
| **validTo** | [**Integer**](integer.md) | Unix timestamp until the order is valid. uint32. | [optional] [default to null] |
12+
| **appData** | [**Integer**](integer.md) | Arbitrary identifier sent along with the order. Could be used to track the interface or other meta-aspects of the order. uint32 encoded | [optional] [default to null] |
13+
| **feeAmount** | [**String**](string.md) | Amount of a token. uint256 encoded in decimal. | [optional] [default to null] |
14+
| **kind** | [**OrderType**](OrderType.md) | | [optional] [default to null] |
15+
| **partiallyFillable** | [**Boolean**](boolean.md) | Is this a fill-or-kill order or a partially fillable order? | [optional] [default to null] |
16+
| **Signature** | [**Object**](.md) | 65 bytes encoded as hex with &#x60;0x&#x60; prefix. r + s + v from the spec. | [optional] [default to null] |
17+
| **creationTime** | [**String**](string.md) | Creation time of the order. Encoded as ISO 8601 UTC. | [optional] [default to null] |
18+
| **owner** | [**String**](string.md) | Ethereum 40 byte address encoded as a hex with &#x60;0x&#x60; prefix. | [optional] [default to null] |
19+
| **UID** | [**String**](string.md) | Unique identifier for the order: 56 bytes encoded as hex with &#x60;0x&#x60; prefix. Bytes 0 to 32 are the order digest, bytes 30 to 52 the owner address and bytes 52..56 valid to, | [optional] [default to null] |
20+
| **availableBalance** | [**String**](string.md) | Amount of a token. uint256 encoded in decimal. | [optional] [default to null] |
21+
| **executedSellAmount** | [**String**](string.md) | A big unsigned integer encoded in decimal. | [optional] [default to null] |
22+
| **executedSellAmountBeforeFees** | [**String**](string.md) | A big unsigned integer encoded in decimal. | [optional] [default to null] |
23+
| **executedBuyAmount** | [**String**](string.md) | A big unsigned integer encoded in decimal. | [optional] [default to null] |
24+
| **executedFeeAmount** | [**String**](string.md) | A big unsigned integer encoded in decimal. | [optional] [default to null] |
25+
| **invalidated** | [**Boolean**](boolean.md) | Has this order been invalidated? | [optional] [default to null] |
26+
27+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

api/Models/OrderCancellation.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# OrderCancellation
2+
3+
## Properties
4+
5+
| Name | Type | Description | Notes |
6+
| ------------- | ----------------- | ---------------------------------------------------------------------------- | ---------------------------- |
7+
| **signature** | [**Object**](.md) | 65 bytes encoded as hex with &#x60;0x&#x60; prefix. r + s + v from the spec. | [optional] [default to null] |
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# OrderCancellationError
2+
3+
## Properties
4+
5+
| Name | Type | Description | Notes |
6+
| --------------- | ----------------------- | ----------- | ---------------------------- |
7+
| **errorType** | [**String**](string.md) | | [optional] [default to null] |
8+
| **description** | [**String**](string.md) | | [optional] [default to null] |
9+
10+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

0 commit comments

Comments
 (0)