Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 59 additions & 1 deletion docs/everyshilling_openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -872,4 +872,62 @@ components:
required: true
refresh_token:
type: string
required: true
required: true


#New Endpoints for Dashboard (BUY AND SELL)
/buy:
post:
summary: Buy Currency
description: Endpoint to buy a specified amount of currency.
requestBody:
description: Request parameters for buying currency.
content:
application/json:
schema:
type: object
properties:
currency:
type: string
description: Currency code (USD, KES).
amount:
type: number
description: Amount of currency to buy.
required:
- currency
- amount
responses:
'200':
description: Currency Purchased successfully
'400':
description: Bad request: invalid currency or amount
'500':
description: Internal server error

/sell:
post:
summary: Sell Currency
description: Endpoint to sell a specified amount of currency.
requestBody:
description: Request parameters for selling currency.
content:
application/json:
schema:
type: object
properties:
currency:
type: string
description: Currency code (USD, KES).
amount:
type: number
description: Amount of currency to sell.
required:
- currency
- amount
responses:
'200':
description: Currency sold successfully
'400':
description: Bad request: invalid currency or amount
'500':
description: Internal server error