|
291 | 291 | } |
292 | 292 | } |
293 | 293 | }, |
| 294 | + { |
| 295 | + "name": "contract_address", |
| 296 | + "in": "query", |
| 297 | + "required": false, |
| 298 | + "schema": { |
| 299 | + "type": "array", |
| 300 | + "items": { |
| 301 | + "type": "string" |
| 302 | + } |
| 303 | + }, |
| 304 | + "description": "List of contract addresses to filter by", |
| 305 | + "example": "0xe9b00a87700f660e46b6f5deaa1232836bcc07d3" |
| 306 | + }, |
294 | 307 | { |
295 | 308 | "name": "from_updated_at", |
296 | 309 | "in": "query", |
|
1713 | 1726 | "description": "Order status to filter by", |
1714 | 1727 | "required": false, |
1715 | 1728 | "schema": { |
1716 | | - "$ref": "#/components/schemas/OrderStatus" |
| 1729 | + "$ref": "#/components/schemas/OrderStatusName" |
1717 | 1730 | } |
1718 | 1731 | }, |
1719 | 1732 | { |
|
4673 | 4686 | ], |
4674 | 4687 | "signature": "0x", |
4675 | 4688 | "start_at": "2022-03-09T05:00:50.52Z", |
4676 | | - "status": "ACTIVE", |
| 4689 | + "status": { |
| 4690 | + "value": "ACTIVE" |
| 4691 | + }, |
4677 | 4692 | "updated_at": "2022-03-07T07:20:50.52Z" |
4678 | 4693 | }, |
4679 | 4694 | "required": [ |
|
4819 | 4834 | "type": "object", |
4820 | 4835 | "properties": { |
4821 | 4836 | "result": { |
4822 | | - "type": "object", |
4823 | | - "properties": { |
4824 | | - "successful_cancellations": { |
4825 | | - "type": "array", |
4826 | | - "description": "Orders which were successfully cancelled", |
4827 | | - "items": { |
4828 | | - "type": "string" |
4829 | | - } |
4830 | | - }, |
4831 | | - "pending_cancellations": { |
4832 | | - "type": "array", |
4833 | | - "description": "Orders which are marked for cancellation but the cancellation cannot be guaranteed", |
4834 | | - "items": { |
4835 | | - "type": "string" |
4836 | | - } |
4837 | | - }, |
4838 | | - "failed_cancellations": { |
4839 | | - "type": "array", |
4840 | | - "description": "Orders which failed to be cancelled", |
4841 | | - "items": { |
4842 | | - "type": "object", |
4843 | | - "properties": { |
4844 | | - "order": { |
4845 | | - "type": "string", |
4846 | | - "description": "ID of the order which failed to be cancelled", |
4847 | | - "example": "7df3e99e-f7b3-459c-bef6-ffb66a18bb59" |
4848 | | - }, |
4849 | | - "reason_code": { |
4850 | | - "type": "string", |
4851 | | - "enum": [ |
4852 | | - "ALREADY_FILLED" |
4853 | | - ], |
4854 | | - "description": "Reason code indicating why the order failed to be cancelled", |
4855 | | - "example": "ALREADY_FILLED" |
4856 | | - } |
4857 | | - }, |
4858 | | - "required": [ |
4859 | | - "order", |
4860 | | - "reason_code" |
4861 | | - ] |
4862 | | - } |
4863 | | - } |
4864 | | - }, |
4865 | | - "required": [ |
4866 | | - "successful_cancellations", |
4867 | | - "pending_cancellations", |
4868 | | - "failed_cancellations" |
4869 | | - ] |
| 4837 | + "$ref": "#/components/schemas/CancelOrdersResultData" |
4870 | 4838 | } |
4871 | 4839 | }, |
4872 | 4840 | "required": [ |
|
4895 | 4863 | } |
4896 | 4864 | } |
4897 | 4865 | }, |
| 4866 | + "CancelOrdersResultData": { |
| 4867 | + "type": "object", |
| 4868 | + "properties": { |
| 4869 | + "successful_cancellations": { |
| 4870 | + "type": "array", |
| 4871 | + "description": "Orders which were successfully cancelled", |
| 4872 | + "items": { |
| 4873 | + "type": "string" |
| 4874 | + }, |
| 4875 | + "minItems": 0, |
| 4876 | + "maxItems": 10 |
| 4877 | + }, |
| 4878 | + "pending_cancellations": { |
| 4879 | + "type": "array", |
| 4880 | + "description": "Orders which are marked for cancellation but the cancellation cannot be guaranteed", |
| 4881 | + "items": { |
| 4882 | + "type": "string" |
| 4883 | + }, |
| 4884 | + "minItems": 0, |
| 4885 | + "maxItems": 10 |
| 4886 | + }, |
| 4887 | + "failed_cancellations": { |
| 4888 | + "type": "array", |
| 4889 | + "description": "Orders which failed to be cancelled", |
| 4890 | + "items": { |
| 4891 | + "$ref": "#/components/schemas/FailedOrderCancellation" |
| 4892 | + }, |
| 4893 | + "minItems": 0, |
| 4894 | + "maxItems": 10 |
| 4895 | + } |
| 4896 | + }, |
| 4897 | + "required": [ |
| 4898 | + "successful_cancellations", |
| 4899 | + "pending_cancellations", |
| 4900 | + "failed_cancellations" |
| 4901 | + ] |
| 4902 | + }, |
| 4903 | + "FailedOrderCancellation": { |
| 4904 | + "type": "object", |
| 4905 | + "properties": { |
| 4906 | + "order": { |
| 4907 | + "type": "string", |
| 4908 | + "description": "ID of the order which failed to be cancelled", |
| 4909 | + "example": "7df3e99e-f7b3-459c-bef6-ffb66a18bb59" |
| 4910 | + }, |
| 4911 | + "reason_code": { |
| 4912 | + "type": "string", |
| 4913 | + "enum": [ |
| 4914 | + "ALREADY_FILLED" |
| 4915 | + ], |
| 4916 | + "description": "Reason code indicating why the order failed to be cancelled", |
| 4917 | + "example": "ALREADY_FILLED" |
| 4918 | + } |
| 4919 | + }, |
| 4920 | + "required": [ |
| 4921 | + "order", |
| 4922 | + "reason_code" |
| 4923 | + ] |
| 4924 | + }, |
4898 | 4925 | "ListingResult": { |
4899 | 4926 | "type": "object", |
4900 | 4927 | "properties": { |
|
4940 | 4967 | ], |
4941 | 4968 | "signature": "0x", |
4942 | 4969 | "start_at": "2022-03-09T05:00:50.52Z", |
4943 | | - "status": "EXPIRED", |
| 4970 | + "status": { |
| 4971 | + "value": "EXPIRED" |
| 4972 | + }, |
4944 | 4973 | "updated_at": "2022-03-07T07:20:50.52Z" |
4945 | 4974 | } |
4946 | 4975 | } |
|
5004 | 5033 | ], |
5005 | 5034 | "signature": "0x", |
5006 | 5035 | "start_at": "2022-03-09T05:00:50.52Z", |
5007 | | - "status": "EXPIRED", |
| 5036 | + "status": { |
| 5037 | + "value": "EXPIRED" |
| 5038 | + }, |
5008 | 5039 | "updated_at": "2022-03-07T07:20:50.52Z" |
5009 | 5040 | }, |
5010 | 5041 | { |
|
5041 | 5072 | ], |
5042 | 5073 | "signature": "0x", |
5043 | 5074 | "start_at": "2022-03-09T05:00:50.52Z", |
5044 | | - "status": "EXPIRED", |
| 5075 | + "status": { |
| 5076 | + "value": "EXPIRED" |
| 5077 | + }, |
5045 | 5078 | "updated_at": "2022-03-07T07:20:50.52Z" |
5046 | 5079 | } |
5047 | 5080 | ] |
|
5173 | 5206 | } |
5174 | 5207 | }, |
5175 | 5208 | "OrderStatus": { |
| 5209 | + "description": "The Order status", |
| 5210 | + "oneOf": [ |
| 5211 | + { |
| 5212 | + "$ref": "#/components/schemas/CancelledOrderStatus" |
| 5213 | + }, |
| 5214 | + { |
| 5215 | + "$ref": "#/components/schemas/PendingOrderStatus" |
| 5216 | + }, |
| 5217 | + { |
| 5218 | + "$ref": "#/components/schemas/ActiveOrderStatus" |
| 5219 | + }, |
| 5220 | + { |
| 5221 | + "$ref": "#/components/schemas/InactiveOrderStatus" |
| 5222 | + }, |
| 5223 | + { |
| 5224 | + "$ref": "#/components/schemas/FilledOrderStatus" |
| 5225 | + }, |
| 5226 | + { |
| 5227 | + "$ref": "#/components/schemas/ExpiredOrderStatus" |
| 5228 | + } |
| 5229 | + ], |
| 5230 | + "discriminator": { |
| 5231 | + "propertyName": "name", |
| 5232 | + "mapping": { |
| 5233 | + "CANCELLED": "#/components/schemas/CancelledOrderStatus", |
| 5234 | + "PENDING": "#/components/schemas/PendingOrderStatus", |
| 5235 | + "ACTIVE": "#/components/schemas/ActiveOrderStatus", |
| 5236 | + "INACTIVE": "#/components/schemas/InactiveOrderStatus", |
| 5237 | + "FILLED": "#/components/schemas/FilledOrderStatus", |
| 5238 | + "EXPIRED": "#/components/schemas/ExpiredOrderStatus" |
| 5239 | + } |
| 5240 | + } |
| 5241 | + }, |
| 5242 | + "CancelledOrderStatus": { |
| 5243 | + "type": "object", |
| 5244 | + "properties": { |
| 5245 | + "name": { |
| 5246 | + "type": "string", |
| 5247 | + "description": "The order status", |
| 5248 | + "enum": [ |
| 5249 | + "CANCELLED" |
| 5250 | + ] |
| 5251 | + }, |
| 5252 | + "is_pending": { |
| 5253 | + "type": "boolean", |
| 5254 | + "description": "Whether the cancellation of the order is pending", |
| 5255 | + "example": false |
| 5256 | + }, |
| 5257 | + "cancellation_type": { |
| 5258 | + "type": "string", |
| 5259 | + "description": "Whether the cancellation was done on-chain or off-chain", |
| 5260 | + "enum": [ |
| 5261 | + "ON_CHAIN", |
| 5262 | + "OFF_CHAIN" |
| 5263 | + ], |
| 5264 | + "example": "ON_CHAIN" |
| 5265 | + } |
| 5266 | + }, |
| 5267 | + "required": [ |
| 5268 | + "name", |
| 5269 | + "is_pending", |
| 5270 | + "cancellation_type" |
| 5271 | + ] |
| 5272 | + }, |
| 5273 | + "PendingOrderStatus": { |
| 5274 | + "type": "object", |
| 5275 | + "properties": { |
| 5276 | + "name": { |
| 5277 | + "type": "string", |
| 5278 | + "description": "The order status", |
| 5279 | + "enum": [ |
| 5280 | + "PENDING" |
| 5281 | + ] |
| 5282 | + } |
| 5283 | + }, |
| 5284 | + "required": [ |
| 5285 | + "name" |
| 5286 | + ] |
| 5287 | + }, |
| 5288 | + "ActiveOrderStatus": { |
| 5289 | + "type": "object", |
| 5290 | + "properties": { |
| 5291 | + "name": { |
| 5292 | + "type": "string", |
| 5293 | + "description": "The order status", |
| 5294 | + "enum": [ |
| 5295 | + "ACTIVE" |
| 5296 | + ] |
| 5297 | + } |
| 5298 | + }, |
| 5299 | + "required": [ |
| 5300 | + "name" |
| 5301 | + ] |
| 5302 | + }, |
| 5303 | + "InactiveOrderStatus": { |
| 5304 | + "type": "object", |
| 5305 | + "properties": { |
| 5306 | + "name": { |
| 5307 | + "type": "string", |
| 5308 | + "description": "The order status", |
| 5309 | + "enum": [ |
| 5310 | + "INACTIVE" |
| 5311 | + ] |
| 5312 | + } |
| 5313 | + }, |
| 5314 | + "required": [ |
| 5315 | + "name" |
| 5316 | + ] |
| 5317 | + }, |
| 5318 | + "ExpiredOrderStatus": { |
| 5319 | + "type": "object", |
| 5320 | + "properties": { |
| 5321 | + "name": { |
| 5322 | + "type": "string", |
| 5323 | + "description": "The order status", |
| 5324 | + "enum": [ |
| 5325 | + "EXPIRED" |
| 5326 | + ] |
| 5327 | + } |
| 5328 | + }, |
| 5329 | + "required": [ |
| 5330 | + "name" |
| 5331 | + ] |
| 5332 | + }, |
| 5333 | + "FilledOrderStatus": { |
| 5334 | + "type": "object", |
| 5335 | + "properties": { |
| 5336 | + "name": { |
| 5337 | + "type": "string", |
| 5338 | + "description": "The order status", |
| 5339 | + "enum": [ |
| 5340 | + "FILLED" |
| 5341 | + ] |
| 5342 | + } |
| 5343 | + }, |
| 5344 | + "required": [ |
| 5345 | + "name" |
| 5346 | + ] |
| 5347 | + }, |
| 5348 | + "OrderStatusName": { |
5176 | 5349 | "type": "string", |
5177 | 5350 | "description": "The Order status", |
5178 | | - "example": "ACTIVE", |
5179 | 5351 | "enum": [ |
5180 | 5352 | "PENDING", |
5181 | 5353 | "ACTIVE", |
5182 | 5354 | "INACTIVE", |
5183 | 5355 | "FILLED", |
5184 | | - "CANCELLED", |
5185 | | - "EXPIRED" |
| 5356 | + "EXPIRED", |
| 5357 | + "CANCELLED" |
5186 | 5358 | ] |
5187 | 5359 | }, |
5188 | 5360 | "ProtocolData": { |
|
0 commit comments