-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add redoc. Move yaml to separate folder
- Loading branch information
Showing
31 changed files
with
601 additions
and
89 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Build stage | ||
FROM golang:1.20 AS build | ||
FROM golang:1.21 AS build | ||
|
||
# Set the working directory | ||
WORKDIR /app | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,221 @@ | ||
openapi: 3.1.0 | ||
info: | ||
description: | | ||
# Introduction | ||
This API is documented in **OpenAPI 3.0 format**. | ||
This API the following operations: | ||
* Retrieve a list of available instruments | ||
* Retrieve a list of executed trades | ||
# Basics | ||
* API calls have to be secured with HTTPS. | ||
* All data has to be submitted UTF-8 encoded. | ||
* The reply is sent JSON encoded. | ||
version: 1.0.0 | ||
title: OPEN OUTCRY API | ||
servers: | ||
- url: https://your.public.url | ||
security: | ||
- basicAuth: [] | ||
paths: | ||
/currencies: | ||
get: | ||
tags: | ||
- currencies | ||
summary: currencies list | ||
description: Returns list of available currencies | ||
operationId: getCurrencies | ||
responses: | ||
'200': | ||
description: currencies list | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/CurrencyList' | ||
'500': | ||
description: Error | ||
/instruments: | ||
get: | ||
tags: | ||
- instruments | ||
summary: instrument list | ||
description: Returns list of available instruments | ||
operationId: getInstruments | ||
responses: | ||
'200': | ||
description: instruments list | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/InstrumentList' | ||
'500': | ||
description: Error | ||
/order_books/{instrument_name}: | ||
get: | ||
tags: | ||
- order_books | ||
summary: get order books | ||
description: Return an order book for an instrument | ||
operationId: getOrderBook | ||
parameters: | ||
- in: path | ||
name: instrument_name | ||
required: true | ||
schema: | ||
$ref: '#/components/schemas/InstrumentName' | ||
responses: | ||
'200': | ||
description: order book | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/OrderBook' | ||
'500': | ||
description: Error | ||
/trades: | ||
get: | ||
tags: | ||
- trades | ||
summary: trades list | ||
description: Returns list of user's trades | ||
operationId: getTrades | ||
responses: | ||
'200': | ||
description: trades list | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/TradeList' | ||
'500': | ||
description: Error | ||
/trade_orders: | ||
get: | ||
tags: | ||
- trade_order | ||
summary: trade order list | ||
description: Returns list of user's active trade orders | ||
operationId: getTradeOrders | ||
responses: | ||
'200': | ||
description: trades orders list | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/TradeOrderList' | ||
'500': | ||
description: Error | ||
components: | ||
securitySchemes: | ||
basicAuth: | ||
type: http | ||
scheme: basic | ||
schemas: | ||
CurrencyName: | ||
type: string | ||
description: ISO 4217 Currency symbol | ||
example: USD | ||
Currency: | ||
type: object | ||
description: Currency of payment account | ||
properties: | ||
name: | ||
$ref: '#/components/schemas/CurrencyName' | ||
precision: | ||
type: integer | ||
description: Currency precision as number of decimal points | ||
example: 2 | ||
CurrencyList: | ||
type: array | ||
description: List of currencies supported by app | ||
items: | ||
$ref: '#/components/schemas/Currency' | ||
Id: | ||
type: string | ||
format: uuid | ||
InstrumentName: | ||
type: string | ||
description: Ticker-like name of the instrument. For monetary instruments, a currency pair is used. | ||
Instrument: | ||
type: object | ||
properties: | ||
id: | ||
$ref: '#/components/schemas/Id' | ||
name: | ||
$ref: '#/components/schemas/InstrumentName' | ||
base_currency: | ||
$ref: '#/components/schemas/CurrencyName' | ||
quote_currency: | ||
$ref: '#/components/schemas/CurrencyName' | ||
enabled: | ||
type: boolean | ||
description: Availability for trading | ||
InstrumentList: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/Instrument' | ||
PriceVolume: | ||
type: object | ||
properties: | ||
price: | ||
type: number | ||
volume: | ||
type: number | ||
OrderBook: | ||
type: object | ||
properties: | ||
sell: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/PriceVolume' | ||
buy: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/PriceVolume' | ||
Trade: | ||
type: object | ||
description: Execute trade | ||
properties: | ||
id: | ||
$ref: '#/components/schemas/Id' | ||
TradeList: | ||
type: array | ||
description: List of executed trades | ||
items: | ||
$ref: '#/components/schemas/Trade' | ||
TradeOrderSide: | ||
type: string | ||
enum: | ||
- SELL | ||
- BUY | ||
TradeOrderTimeInForce: | ||
type: string | ||
enum: | ||
- GTC | ||
- IOC | ||
- FOK | ||
- GTD | ||
- GTT | ||
TradeOrderStatus: | ||
type: string | ||
enum: | ||
- OPEN | ||
- REJECTED | ||
- CANCELLED | ||
TradeOrder: | ||
type: object | ||
properties: | ||
id: | ||
$ref: '#/components/schemas/Id' | ||
instrument: | ||
$ref: '#/components/schemas/InstrumentName' | ||
side: | ||
$ref: '#/components/schemas/TradeOrderSide' | ||
timeInForce: | ||
$ref: '#/components/schemas/TradeOrderTimeInForce' | ||
status: | ||
$ref: '#/components/schemas/TradeOrderStatus' | ||
TradeOrderList: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/TradeOrder' |
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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
Oops, something went wrong.