-
Notifications
You must be signed in to change notification settings - Fork 43
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
5 changed files
with
322 additions
and
10 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,274 @@ | ||
{ | ||
"openapi": "3.0.3", | ||
"info": { | ||
"title": "API Arcadia Finance", | ||
"description": "Arcadia OpenAPI", | ||
"version": "2.0.2-oas3" | ||
}, | ||
"servers": [ | ||
{ | ||
"url": "/" | ||
} | ||
], | ||
"paths": { | ||
"/api/lower_bar.php": { | ||
"get": { | ||
"summary": "get lower bar", | ||
"responses": { | ||
"200": { | ||
"description": "200 response" | ||
} | ||
} | ||
} | ||
}, | ||
"/api/side_bar.php": { | ||
"get": { | ||
"summary": "get side bar", | ||
"responses": { | ||
"200": { | ||
"description": "200 response" | ||
} | ||
} | ||
} | ||
}, | ||
"/api/side_bar_accounts.php": { | ||
"get": { | ||
"summary": "get side bar", | ||
"responses": { | ||
"200": { | ||
"description": "200 response" | ||
} | ||
} | ||
} | ||
}, | ||
"/trading/rest/portfolio.php": { | ||
"get": { | ||
"summary": "get portfolio", | ||
"responses": { | ||
"200": { | ||
"description": "200 response" | ||
} | ||
} | ||
} | ||
}, | ||
"/trading/rest/buy_stocks.php": { | ||
"post": { | ||
"summary": "Add stocks to your portfolio", | ||
"requestBody": { | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"$ref": "#/components/schemas/buy" | ||
}, | ||
"example": { | ||
"trans_value": "312", | ||
"qty": "16", | ||
"company": "MSFT", | ||
"action": "buy", | ||
"stock_price": "198" | ||
} | ||
} | ||
}, | ||
"required": true | ||
}, | ||
"responses": { | ||
"200": { | ||
"description": "200 response", | ||
"content": { | ||
"application/json": { | ||
"example": { | ||
"status": "success", | ||
"name": "Microsoft", | ||
"qty": "16", | ||
"amount": "312", | ||
"transid": "855415223" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"/trading/rest/sell_stocks.php": { | ||
"post": { | ||
"summary": "Sell stocks that you own", | ||
"requestBody": { | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"$ref": "#/components/schemas/sell" | ||
}, | ||
"example": { | ||
"trans_value": "212", | ||
"qty": "16", | ||
"company": "MSFT", | ||
"action": "sell", | ||
"stock_price": "158" | ||
} | ||
} | ||
}, | ||
"required": true | ||
}, | ||
"responses": { | ||
"200": { | ||
"description": "200 response", | ||
"content": { | ||
"application/json": { | ||
"example": { | ||
"status": "success", | ||
"name": "Microsoft", | ||
"qty": "16", | ||
"amount": "212", | ||
"transid": "658854124" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"/trading/transactions.php": { | ||
"get": { | ||
"summary": "Get the latests transactions that have happened", | ||
"responses": { | ||
"200": { | ||
"description": "200 response", | ||
"content": { | ||
"application/json": { | ||
"example": { | ||
"YourLastTransaction": "MFST 2000" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"/api/rest/execute_money_transfer.php": { | ||
"post": { | ||
"summary": "Transfer money to a friend", | ||
"requestBody": { | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"$ref": "#/components/schemas/money_transfer" | ||
}, | ||
"example": { | ||
"amount": "92", | ||
"account": "2075894", | ||
"currency": "GBP", | ||
"friend": "Vincent" | ||
} | ||
} | ||
}, | ||
"required": true | ||
}, | ||
"responses": { | ||
"200": { | ||
"description": "200 response", | ||
"content": { | ||
"application/json": { | ||
"example": { | ||
"name": "Vincent", | ||
"status": "success", | ||
"currency": "GBP", | ||
"transid": "524569855", | ||
"msg": "The money transfer has been successfully completed" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"components": { | ||
"schemas": { | ||
"buy": { | ||
"required": [ | ||
"action", | ||
"company", | ||
"qty", | ||
"stock_price", | ||
"trans_value" | ||
], | ||
"type": "object", | ||
"properties": { | ||
"trans_value": { | ||
"type": "integer", | ||
"format": "int64" | ||
}, | ||
"qty": { | ||
"type": "integer", | ||
"format": "int64" | ||
}, | ||
"company": { | ||
"type": "string" | ||
}, | ||
"action": { | ||
"type": "string" | ||
}, | ||
"stock_price": { | ||
"type": "integer", | ||
"format": "int64" | ||
} | ||
} | ||
}, | ||
"sell": { | ||
"required": [ | ||
"action", | ||
"company", | ||
"qty", | ||
"stock_price", | ||
"trans_value" | ||
], | ||
"type": "object", | ||
"properties": { | ||
"trans_value": { | ||
"type": "integer", | ||
"format": "int64" | ||
}, | ||
"qty": { | ||
"type": "integer", | ||
"format": "int64" | ||
}, | ||
"company": { | ||
"type": "string" | ||
}, | ||
"action": { | ||
"type": "string" | ||
}, | ||
"stock_price": { | ||
"type": "integer", | ||
"format": "int64" | ||
} | ||
} | ||
}, | ||
"money_transfer": { | ||
"required": [ | ||
"account", | ||
"amount", | ||
"currency", | ||
"friend" | ||
], | ||
"type": "object", | ||
"properties": { | ||
"amount": { | ||
"type": "integer", | ||
"format": "int64" | ||
}, | ||
"account": { | ||
"type": "integer", | ||
"format": "int64" | ||
}, | ||
"currency": { | ||
"type": "string" | ||
}, | ||
"friend": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
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