-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 changed file
with
1 addition
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"openapi":"3.1.0","info":{"title":"Forex Trading Platform API","description":"A RESTful API to simulate a Forex trading platform with WebSocket support for real-time order updates.","version":"1.0.0"},"paths":{"/orders":{"get":{"summary":"Retrieve All Orders","operationId":"retrieve_all_orders_orders_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OrderOutput"},"type":"array","title":"Response Retrieve All Orders Orders Get"}}}}}},"post":{"summary":"Post Order","operationId":"post_order_orders_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderInput"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/orders/{orderId}":{"get":{"summary":"Get Order By Id","operationId":"get_order_by_id_orders__orderId__get","parameters":[{"name":"orderId","in":"path","required":true,"schema":{"type":"string","title":"Orderid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Cancel An Order","operationId":"cancel_an_order_orders__orderId__delete","parameters":[{"name":"orderId","in":"path","required":true,"schema":{"type":"string","title":"Orderid"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"OrderInput":{"properties":{"stocks":{"type":"string","title":"Stocks","description":"Currency pair symbol (e.g. 'EURUSD'), or any other stuff"},"quantity":{"type":"number","title":"Quantity","description":"Quantity of the currency pair to be traded"}},"type":"object","title":"OrderInput"},"OrderOutput":{"properties":{"stocks":{"type":"string","title":"Stocks","description":"Currency pair symbol (e.g. 'EURUSD'), or any other stuff"},"quantity":{"type":"number","title":"Quantity","description":"Quantity of the currency pair to be traded"},"id":{"type":"string","title":"Id"},"status":{"type":"string","enum":["PENDING","EXECUTED","CANCELED"],"title":"Status","description":"Status of the order"}},"type":"object","required":["id"],"title":"OrderOutput"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}} |