From 85bbff4250876ec4cbb5eda6275558ae01bb9cb5 Mon Sep 17 00:00:00 2001 From: Vhaustro Date: Wed, 17 May 2023 17:55:21 +0400 Subject: [PATCH] added buy and sell endpoint for dashboard --- docs/everyshilling_openapi.yaml | 60 ++++++++++++++++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/docs/everyshilling_openapi.yaml b/docs/everyshilling_openapi.yaml index 2dc22b3..f1adaec 100644 --- a/docs/everyshilling_openapi.yaml +++ b/docs/everyshilling_openapi.yaml @@ -872,4 +872,62 @@ components: required: true refresh_token: type: string - required: true \ No newline at end of file + 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 \ No newline at end of file