MilaexGPT

MilaexGPT · GPT 작업

Mila-ex API

# A simple, unified Crypto Exchange API aggregator. ## Introduction Welcome to the API documentation for Mila-ex SaaS solution that provides an API to interact with multiple cryptocurrency exchanges. Our API allows developers to access and integrate exchange functionality into their applications, enabling them to perform various operations such as fetching market data, placing trades (COMING SOON), and managing user accounts across multiple exchanges (COMING SOON). ## Authentication To interact with our API, you need to authenticate your requests using an API key. Follow the steps below to obtain an API key: 1. Sign up for an account on our [website](https://milaex.com). 2. Log in to your account and navigate to the API keys page. 3. Generate a new API key by providing a name for your application or service. 4. Once generated, you will receive an API key. ### Request Authentication To authenticate your API requests, include the following headers in each request: ``` x-api-key: YOUR_API_KEY ``` Replace `YOUR_API_KEY` with your generated API key. ### Example Request Authentication Here's an example of how to authenticate a request using cURL: ```bash curl -H "x-api-key: YOUR_API_KEY" https://api.milaex.com/api/v1/exchange ``` ## Errors Our API uses standard HTTP status codes to indicate the success or failure of a request. In case of an error, the response will include an error code and a corresponding message to help identify and resolve the issue. ### Structure There is a general structure for when an error occurs, whether it be a standard HTTP error or a mila-ex custom error. The JSON for this model is as follows: ```json { "Code": "", "Message": "", "Errors": [ { "ErrorCode": "", "Message": "", "Path": "/path", "Url": "https://example.com" } ], "Description": "" } ``` ### General HTTP Errors Here are some common error codes you might encounter: | Error Code | Description | |------------|--------------------------| | 400 | Bad Request | | 401 | Unauthorized | | 403 | Forbidden | | 404 | Not Found | | 429 | Too Many Requests | | 500 | Internal Server Error | ### Mila-ex Errors When there is an internal failure with either integrating with an exchange, an unsupported request (104) (eg. orderbook not available on all exchanges) or just general errors that we would like to make you aware of: |Code| Description | |----|----------------------------------------------------------------------------------------| |-1 | A general failure has occurred. | |0 | Operation completed successfully. | |100 | An error occurred with the REST response. | |101 | The response data contained an error. | |102 | The response data was empty. | |103 | The requested data could not be found. | |104 | This operation is not supported. | |105 | Your system time is ahead of the server's time. | |106 | The balance available for withdrawal is insufficient. | |107 | The cancellation request is pending. | |108 | Too many addresses are associated with this account. | |109 | The amount specified is invalid. | |110 | This system does not support market orders. | |111 | The order could not be found. | |112 | The withdrawal request could not be found. | |113 | Operation failed! Orders may have been completed or revoked. Reference ID is unknown. | |114 | The provided signature did not match the expected signature. | |115 | Authentication failed. The Google Authenticator code or signature was incorrect. | |116 | The provided API key does not have the required permissions. | |117 | The requested API function does not exist, or an invalid parameter was provided. | |118 | The exchange is currently unavailable due to unstable network or ongoing maintenance. | |119 | Too many requests were made in a short period of time. | |120 | The server is busy. Please try again later. | |121 | No additional information is available. | |122 | There was a validation error with the supplied parameters. | |123 | The supplied symbol is invalid. | |124 | The request contains illegal characters. | |125 | The exchange passed was invalid | |126 | The supplied pair is invalid | In general, for errors, the following is the mapping: | Property | Mapping | |------------|-----------------------------------| | Code | One of the codes above | | Message | Additional information | | Description| The description of the code above | | Errors | More information about the error | ## Rate Limits To ensure fair usage and maintain system stability, we have rate limits in place for API requests. The rate limits are defined per endpoint and are subject to change based on your subscription plan. The rate limits are as follows: | Endpoint | Requests Per Minute (RPM) | Addtional | |------------------------------|---------------------------|-------------------------| | /exchange | 10000 |This an overall API limit| | /exchange/markets | 60 | | | /exchange/tickers | 30 | | | /exchange/ticker | 30 | | | /exchange/ohlcv | 6 (1 every 10 seconds) | | | /exchange/orderbook | 12 (2 every 10 seconds) | | | /exchange/orderbook/complete | 12 (2 every 10 seconds) | | Please make sure to manage your requests within the specified rate limits. If you exceed the rate limits, you will receive a `429 Too Many Requests` error response. When an endpoint is **Overall API Limit** it means that any user of the API may cause the rate limit. In addition to the above rate limits, please be aware that your subscription plan may also have an overall monthly limit on the number of API requests per month. This monthly limit is specific to your subscription and may differ based on the plan you have selected. To find out more about your specific monthly limit, refer to your subscription details or contact our support team at support@milaex.com for further assistance. We hope you find our API documentation useful and enjoy integrating our SaaS solution into your applications. Happy coding! ### Rate Limit Headers | Header Name | Description | |------------------------------|------------------------------------------------------------| | X-Rate-Limit-Limit | This is the max requests for the endpoint called | | X-Rate-Limit-Remaining | How many requests within the RPM you have left | | X-Rate-Limit-Reset | The time your rate limit will reset | | X-Rate-Limit-Monthly | How many requests you have left based on your subscription | # Endpoint Information ## Markets The result object of the markets endpoint includes the following properties The response object is a JSON Object, with keys and values The **key** property is the market id or pair in which the data in the **value** relates to. You can find the response body in the [Markets](#tag/Information/operation/GetMarketList) endpoint. Some important information to denote about certain properties are as follows: | Property Name | Information | |------------------------------|------------------------------------------------------------------------------------| | baseLongName | Base long name will not always be populated due to limitations with some exchanges | | quoteLongName | Quote long name will not always be populated due to limitations with some exchanges| | limits.quantity | This may be **zero/0** based on whether or not the exchange supplies it | | limits.price | This may be **zero/0** based on whether or not the exchange supplies it | | limits.amount | This is calculate based on the quantity and price | ## Version History This section provides an overview of the version history for our API. It outlines the releases, updates, and changes made to the API over time. By keeping track of the version history, you can stay informed about the evolution of our API and any relevant updates that may impact your integration. ### Version 1.0 (Released: June 30th, 2023) - Initial API release with markets, tickers, ohlcv, and orderbook information Please note that this version history is not exhaustive and may not include every minor update or bug fix. It highlights the significant releases and notable changes made to the API. For more detailed information about each release, refer to the release notes or changelog provided with the respective API version. If you have any questions or need further assistance regarding a specific API version, please contact our support team at support@milaex.com.

  • GET /api/v1/exchangeGet available exchanges

    This endpoint will return a list of all actively working exchanges

  • GET /api/v1/exchange/marketsGet an Exchanges Market Information

    Get all available markets from a given exchange

  • GET /api/v1/exchange/tickerGet Ticker information

    Retrieve the ticker information for a specific market pair

  • GET /api/v1/exchange/tickersGet Tickers information

    Retrieve the ticker information for multiple symbols

  • GET /api/v1/exchange/ohlcvGet OHLCV (Candles)

    Get the candles for a specific market pair from an exchange

  • GET /api/v1/exchange/orderbookGet orderbook

    Get the open orders for a specific market pair

  • GET /api/v1/exchange/orderbook/completeGet completed orderbook

    Get the completed orderbook for a given market pair

원본 API 스키마
{
  "openapi": "3.0.1",
  "info": {
    "title": "Mila-ex API",
    "description": "# A simple, unified Crypto Exchange API aggregator.\n\n## Introduction\nWelcome to the API documentation for Mila-ex SaaS solution that provides an API to interact with multiple cryptocurrency exchanges. \nOur API allows developers to access and integrate exchange functionality into their applications, enabling them to perform various operations such as fetching market data, placing trades (COMING SOON), and managing user accounts across multiple exchanges (COMING SOON).\n\n## Authentication\nTo interact with our API, you need to authenticate your requests using an API key. Follow the steps below to obtain an API key:\n\n1. Sign up for an account on our [website](https://milaex.com).\n2. Log in to your account and navigate to the API keys page.\n3. Generate a new API key by providing a name for your application or service.\n4. Once generated, you will receive an API key.\n\n### Request Authentication\nTo authenticate your API requests, include the following headers in each request:\n\n```\nx-api-key: YOUR_API_KEY\n```\n\nReplace `YOUR_API_KEY` with your generated API key.\n\n### Example Request Authentication\nHere's an example of how to authenticate a request using cURL:\n\n```bash\ncurl -H \"x-api-key: YOUR_API_KEY\" https://api.milaex.com/api/v1/exchange\n```\n\n## Errors\nOur API uses standard HTTP status codes to indicate the success or failure of a request. In case of an error, the response will include an error code and a corresponding message to help identify and resolve the issue.\n\n### Structure\nThere is a general structure for when an error occurs, whether it be a standard HTTP error or a mila-ex custom error. The JSON for this model is as follows:\n\n```json\n{\n    \"Code\": \"\",\n    \"Message\": \"\",\n    \"Errors\": [\n        {\n            \"ErrorCode\": \"\",\n            \"Message\": \"\",\n            \"Path\": \"/path\",\n            \"Url\": \"https://example.com\"\n        }\n    ],\n    \"Description\": \"\"\n}\n```\n\n### General HTTP Errors\nHere are some common error codes you might encounter:\n\n| Error Code | Description              |\n|------------|--------------------------|\n| 400        | Bad Request              |\n| 401        | Unauthorized             |\n| 403        | Forbidden                |\n| 404        | Not Found                |\n| 429        | Too Many Requests        |\n| 500        | Internal Server Error    |\n\n### Mila-ex Errors\nWhen there is an internal failure with either integrating with an exchange, an unsupported request (104) (eg. orderbook not available on all exchanges) or just general errors that we would like to make you aware of:\n\n|Code| \tDescription                                                                           |\n|----|----------------------------------------------------------------------------------------|\n|-1\t |  A general failure has occurred.                                                       | \n|0\t |  Operation completed successfully.                                                     |\n|100 | \tAn error occurred with the REST response.                                             |\n|101 | \tThe response data contained an error.                                                 |\n|102 | \tThe response data was empty.                                                          |\n|103 | \tThe requested data could not be found.                                                |\n|104 | \tThis operation is not supported.                                                      |\n|105 | \tYour system time is ahead of the server's time.                                       |\n|106 | \tThe balance available for withdrawal is insufficient.                                 |\n|107 | \tThe cancellation request is pending.                                                  |\n|108 | \tToo many addresses are associated with this account.                                  |\n|109 | \tThe amount specified is invalid.                                                      |\n|110 | \tThis system does not support market orders.                                           |\n|111 | \tThe order could not be found.                                                         |\n|112 | \tThe withdrawal request could not be found.                                            |\n|113 | \tOperation failed! Orders may have been completed or revoked. Reference ID is unknown. |\n|114 | \tThe provided signature did not match the expected signature.                          |\n|115 | \tAuthentication failed. The Google Authenticator code or signature was incorrect.      |\n|116 | \tThe provided API key does not have the required permissions.                          |\n|117 | \tThe requested API function does not exist, or an invalid parameter was provided.      |\n|118 | \tThe exchange is currently unavailable due to unstable network or ongoing maintenance. |\n|119 | \tToo many requests were made in a short period of time.                                |\n|120 | \tThe server is busy. Please try again later.                                           |\n|121 | \tNo additional information is available.                                               |\n|122 | \tThere was a validation error with the supplied parameters.                            |\n|123 | \tThe supplied symbol is invalid.                                                       |\n|124 | \tThe request contains illegal characters.                                              |\n|125 | \tThe exchange passed was invalid                                                       |\n|126 | \tThe supplied pair is invalid                                                          |\n\nIn general, for errors, the following is the mapping:\n\n| Property   | Mapping                           |\n|------------|-----------------------------------|\n| Code       | One of the codes above            |\n| Message    | Additional information            |\n| Description| The description of the code above |\n| Errors     | More information about the error  |\n\n## Rate Limits\nTo ensure fair usage and maintain system stability, we have rate limits in place for API requests. The rate limits are defined per endpoint and are subject to change based on your subscription plan. The rate limits are as follows:\n\n| Endpoint                     | Requests Per Minute (RPM) | Addtional               |\n|------------------------------|---------------------------|-------------------------|\n| /exchange                    | 10000                     |This an overall API limit|\n| /exchange/markets            | 60                        |                         |\n| /exchange/tickers            | 30                        |                         |\n| /exchange/ticker             | 30                        |                         |\n| /exchange/ohlcv              | 6 (1 every 10 seconds)    |                         |\n| /exchange/orderbook          | 12 (2 every 10 seconds)   |                         |\n| /exchange/orderbook/complete | 12 (2 every 10 seconds)   |                         |\n\nPlease make sure to manage your requests within the specified rate limits. \nIf you exceed the rate limits, you will receive a `429 Too Many Requests` error response.\n\nWhen an endpoint is **Overall API Limit** it means that any user of the API may cause the rate limit.\n\nIn addition to the above rate limits, please be aware that your subscription plan may also have an overall monthly limit on the number of API requests per month. \nThis monthly limit is specific to your subscription and may differ based on the plan you have selected. \nTo find out more about your specific monthly limit, refer to your subscription details or contact our support team at support@milaex.com for further assistance.\n\nWe hope you find our API documentation useful and enjoy integrating our SaaS solution into your applications. Happy coding!\n\n### Rate Limit Headers\n\n| Header Name                  | Description                                                |\n|------------------------------|------------------------------------------------------------|\n| X-Rate-Limit-Limit           | This is the max requests for the endpoint called           |\n| X-Rate-Limit-Remaining       | How many requests within the RPM you have left             |\n| X-Rate-Limit-Reset           | The time your rate limit will reset                        |\n| X-Rate-Limit-Monthly         | How many requests you have left based on your subscription |\n\n# Endpoint Information\n## Markets\n\nThe result object of the markets endpoint includes the following properties\n\nThe response object is a JSON Object, with keys and values\nThe **key** property is the market id or pair in which the data in the **value** relates to. \n\nYou can find the response body in the [Markets](#tag/Information/operation/GetMarketList) endpoint. \nSome important information to denote about certain properties are as follows:\n\n| Property Name                | Information                                                                        |\n|------------------------------|------------------------------------------------------------------------------------|\n| baseLongName                 | Base long name will not always be populated due to limitations with some exchanges |\n| quoteLongName                | Quote long name will not always be populated due to limitations with some exchanges|\n| limits.quantity              | This may be **zero/0** based on whether or not the exchange supplies it            |\n| limits.price                 | This may be **zero/0** based on whether or not the exchange supplies it            |\n| limits.amount                | This is calculate based on the quantity and price                                  |\n\n\n## Version History\n\nThis section provides an overview of the version history for our API. \nIt outlines the releases, updates, and changes made to the API over time. \nBy keeping track of the version history, you can stay informed about the evolution of our API and any relevant updates that may impact your integration.\n\n### Version 1.0 (Released: June 30th, 2023)\n- Initial API release with markets, tickers, ohlcv, and orderbook information\n\nPlease note that this version history is not exhaustive and may not include every minor update or bug fix. \nIt highlights the significant releases and notable changes made to the API. For more detailed information about each release, \nrefer to the release notes or changelog provided with the respective API version.\n\nIf you have any questions or need further assistance regarding a specific API version, please contact our support team at support@milaex.com.",
    "contact": {
      "name": "Mila-ex",
      "email": "support@milaex.com"
    },
    "version": "v1",
    "x-logo": {
      "url": "https://milaex-public.s3.eu-west-1.amazonaws.com/Mila-ex_Logos-01.svg"
    }
  },
  "servers": [
    {
      "url": "https://api.milaex.com",
      "description": "Mila-ex API"
    }
  ],
  "paths": {
    "/api/v1/exchange": {
      "get": {
        "tags": [
          "Information"
        ],
        "summary": "Get available exchanges",
        "description": "This endpoint will return a list of all actively working exchanges",
        "operationId": "GetExchangeList",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExchangeListGenericResponse"
                },
                "example": {
                  "Data": {
                    "exchange-a": {
                      "ExchangeCapabilities": null,
                      "DealerName": "exchange-a",
                      "GuaranteedPair": {
                        "Base": "BTC",
                        "Quote": "USDT"
                      }
                    },
                    "exchange-b": {
                      "ExchangeCapabilities": null,
                      "DealerName": "exchange-a",
                      "GuaranteedPair": {
                        "Base": "BTC",
                        "Quote": "ETH"
                      }
                    }
                  },
                  "Links": {
                    "property1": "string"
                  },
                  "Meta": {
                    "count": 2,
                    "exchangeKeys": [
                      "exchange-a",
                      "exchange-b"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardRestErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardRestErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardRestErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardRestErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/exchange/markets": {
      "get": {
        "tags": [
          "Information"
        ],
        "summary": "Get an Exchanges Market Information",
        "description": "Get all available markets from a given exchange",
        "operationId": "GetMarketList",
        "parameters": [
          {
            "name": "exchange",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarketsGenericResponse"
                },
                "example": {
                  "Data": {
                    "MATIC/USD": {
                      "marketId": "MATIC/USD",
                      "symbol": "MATICUSD",
                      "baseName": "MATIC",
                      "quoteName": "USD",
                      "baseId": "MATIC",
                      "quoteId": "USD",
                      "makerFee": 0,
                      "takerFee": 0,
                      "active": false,
                      "depositEnabled": true,
                      "withdrawEnabled": true,
                      "limits": {
                        "quantity": {
                          "min": 0.1,
                          "max": 1000000000
                        },
                        "price": {
                          "min": 0.00001,
                          "max": 50
                        },
                        "amount": {
                          "min": 0.000001,
                          "max": 50000000000
                        }
                      }
                    }
                  },
                  "Links": {
                    "property1": "string"
                  },
                  "Meta": {
                    "coinNames": {
                      "MATIC": "MATIC"
                    },
                    "currencyNames": {
                      "MATIC": "MATIC",
                      "USD": "USD"
                    },
                    "count": 1,
                    "exchange": "milaex"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardRestErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardRestErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardRestErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardRestErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/exchange/ticker": {
      "get": {
        "tags": [
          "Tickers"
        ],
        "summary": "Get Ticker information",
        "description": "Retrieve the ticker information for a specific market pair",
        "operationId": "GetTickerList",
        "parameters": [
          {
            "name": "exchange",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "base_name",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "quote_name",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TickerGenericResponse"
                },
                "example": {
                  "Data": {
                    "symbol": "MATIC_USDT",
                    "timestamp": 1690220447825,
                    "datetime": "2023-07-24T17:40:47.8250000Z",
                    "bidPrice": 0.72097,
                    "bidQuantity": 0,
                    "askPrice": 0.72152,
                    "askQuantity": 0,
                    "vwap": 0,
                    "openPrice": 0,
                    "closePrice": 0.72118,
                    "highPrice": 0.76775,
                    "lowPrice": 0.71047,
                    "lastPrice": 0.72118,
                    "prevPrice": 0,
                    "changePrice": -0.0451,
                    "percentage": 0,
                    "average": 0,
                    "baseVolume": 0,
                    "quoteVolume": 0,
                    "pairVolume": 221582.6
                  },
                  "Links": {
                    "property1": "string"
                  },
                  "Meta": {
                    "exchange": "milaex"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardRestErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardRestErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardRestErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardRestErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/exchange/tickers": {
      "get": {
        "tags": [
          "Tickers"
        ],
        "summary": "Get Tickers information",
        "description": "Retrieve the ticker information for multiple symbols",
        "operationId": "GetTickerList",
        "parameters": [
          {
            "name": "exchange",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "symbols",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TickersGenericResponse"
                },
                "example": {
                  "Data": [
                    {
                      "symbol": "MATIC_USDT",
                      "timestamp": 1690220447825,
                      "datetime": "2023-07-24T17:40:47.8250000Z",
                      "bidPrice": 0.72097,
                      "bidQuantity": 0,
                      "askPrice": 0.72152,
                      "askQuantity": 0,
                      "vwap": 0,
                      "openPrice": 0,
                      "closePrice": 0.72118,
                      "highPrice": 0.76775,
                      "lowPrice": 0.71047,
                      "lastPrice": 0.72118,
                      "prevPrice": 0,
                      "changePrice": -0.0451,
                      "percentage": 0,
                      "average": 0,
                      "baseVolume": 0,
                      "quoteVolume": 0,
                      "pairVolume": 221582.6
                    }
                  ],
                  "Links": {
                    "property1": "string"
                  },
                  "Meta": {
                    "count": 1,
                    "exchange": "milaex"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardRestErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardRestErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardRestErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardRestErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/exchange/ohlcv": {
      "get": {
        "tags": [
          "Candles",
          "OHLCV"
        ],
        "summary": "Get OHLCV (Candles)",
        "description": "Get the candles for a specific market pair from an exchange",
        "operationId": "GetOHLCVList",
        "parameters": [
          {
            "name": "exchange",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "base_name",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "quote_name",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OHLCVsGenericResponse"
                },
                "example": {
                  "Data": [
                    {
                      "timestamp": 1690156800000,
                      "datetime": "2023-07-24T00:00:00.0000000Z",
                      "openPrice": 30083.75,
                      "highPrice": 30099.58,
                      "lowPrice": 28861.9,
                      "closePrice": 29080.31,
                      "amount": 0,
                      "volume": 35694.04022,
                      "vwap": 0,
                      "count": 1
                    },
                    {
                      "timestamp": 1688515200000,
                      "datetime": "2023-07-05T00:00:00.0000000Z",
                      "openPrice": 30766.52,
                      "highPrice": 30878.07,
                      "lowPrice": 30200,
                      "closePrice": 30504.81,
                      "amount": 0,
                      "volume": 33215.67122,
                      "vwap": 0,
                      "count": 3
                    }
                  ],
                  "Links": {
                    "property1": "string"
                  },
                  "Meta": {
                    "count": 2,
                    "marketId": "BTC/USDT",
                    "exchange": "milaex"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardRestErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardRestErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardRestErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardRestErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/exchange/orderbook": {
      "get": {
        "tags": [
          "Orderbook"
        ],
        "summary": "Get orderbook",
        "description": "Get the open orders for a specific market pair",
        "operationId": "GetOrderBookList",
        "parameters": [
          {
            "name": "exchange",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "base_name",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "quote_name",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderBooksGenericResponse"
                },
                "example": {
                  "Data": {
                    "marketId": "BTC/USDT",
                    "symbol": "BTCUSDT",
                    "timestamp": 1690221043364,
                    "datetime": "2023-07-24T17:50:43.3640000Z",
                    "nonce": 0,
                    "bids": [
                      {
                        "quantity": 0.483,
                        "price": 29073.02,
                        "amount": 14042.26866,
                        "count": 1
                      },
                      {
                        "quantity": 0.01984,
                        "price": 29071.2,
                        "amount": 576.772608,
                        "count": 1
                      }
                    ],
                    "asks": [
                      {
                        "quantity": 0.01,
                        "price": 29077.78,
                        "amount": 290.7778,
                        "count": 1
                      },
                      {
                        "quantity": 0.15718,
                        "price": 29077.79,
                        "amount": 4570.4470322,
                        "count": 2
                      }
                    ]
                  },
                  "Links": {
                    "property1": "string"
                  },
                  "Meta": {
                    "marketId": "BTC/USDT",
                    "exchange": "milaex"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardRestErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardRestErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardRestErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardRestErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/exchange/orderbook/complete": {
      "get": {
        "tags": [
          "Orderbook"
        ],
        "summary": "Get completed orderbook",
        "description": "Get the completed orderbook for a given market pair",
        "operationId": "GetCompleteOrders",
        "parameters": [
          {
            "name": "exchange",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "base_name",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "quote_name",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompleteOrdersGenericResponse"
                },
                "example": {
                  "Data": null,
                  "Links": {
                    "property1": "string"
                  },
                  "Meta": {
                    "count": 1,
                    "marketId": null,
                    "exchange": "milaex"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardRestErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardRestErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardRestErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardRestErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "BaseQuote": {
        "type": "object",
        "properties": {
          "Base": {
            "type": "string",
            "nullable": true
          },
          "Quote": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CompleteOrdersGenericResponse": {
        "type": "object",
        "properties": {
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ICompleteOrderItem"
            },
            "nullable": true
          },
          "Links": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true
          },
          "Meta": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ExchangeCapabilities": {
        "type": "object",
        "properties": {
          "FetchMarkets": {
            "type": "boolean"
          },
          "FetchTickers": {
            "type": "boolean"
          },
          "FetchTicker": {
            "type": "boolean"
          },
          "FetchCandles": {
            "type": "boolean"
          },
          "FetchOrderbook": {
            "type": "boolean"
          },
          "FetchCompletedOrderbook": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "ExchangeInfo": {
        "type": "object",
        "properties": {
          "ExchangeCapabilities": {
            "$ref": "#/components/schemas/ExchangeCapabilities"
          },
          "DealerName": {
            "type": "string",
            "nullable": true
          },
          "GuaranteedPair": {
            "$ref": "#/components/schemas/BaseQuote"
          }
        },
        "additionalProperties": false
      },
      "ExchangeListGenericResponse": {
        "type": "object",
        "properties": {
          "Data": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/ExchangeInfo"
            },
            "nullable": true
          },
          "Links": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true
          },
          "Meta": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "FillType": {
        "enum": [
          "Unknown",
          "Fill",
          "Partial_Fill"
        ],
        "type": "string"
      },
      "ICompleteOrderItem": {
        "type": "object",
        "properties": {
          "transactionId": {
            "type": "string",
            "nullable": true
          },
          "timestamp": {
            "type": "integer",
            "format": "int64"
          },
          "datetime": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "orderId": {
            "type": "string",
            "nullable": true
          },
          "orderType": {
            "$ref": "#/components/schemas/OrderType"
          },
          "sideType": {
            "$ref": "#/components/schemas/SideType"
          },
          "makerType": {
            "$ref": "#/components/schemas/MakerType"
          },
          "fillType": {
            "$ref": "#/components/schemas/FillType"
          },
          "quantity": {
            "type": "number",
            "format": "double"
          },
          "price": {
            "type": "number",
            "format": "double"
          },
          "amount": {
            "type": "number",
            "format": "double"
          },
          "fee": {
            "type": "number",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "IMarketItem": {
        "type": "object",
        "properties": {
          "marketId": {
            "type": "string",
            "nullable": true
          },
          "symbol": {
            "type": "string",
            "nullable": true
          },
          "baseName": {
            "type": "string",
            "nullable": true
          },
          "quoteName": {
            "type": "string",
            "nullable": true
          },
          "baseId": {
            "type": "string",
            "nullable": true
          },
          "quoteId": {
            "type": "string",
            "nullable": true
          },
          "active": {
            "type": "boolean"
          },
          "limits": {
            "$ref": "#/components/schemas/MarketLimits"
          }
        },
        "additionalProperties": false
      },
      "IOHLCVItem": {
        "type": "object",
        "properties": {
          "timestamp": {
            "type": "integer",
            "format": "int64"
          },
          "datetime": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "openPrice": {
            "type": "number",
            "format": "double"
          },
          "highPrice": {
            "type": "number",
            "format": "double"
          },
          "lowPrice": {
            "type": "number",
            "format": "double"
          },
          "closePrice": {
            "type": "number",
            "format": "double"
          },
          "amount": {
            "type": "number",
            "format": "double"
          },
          "volume": {
            "type": "number",
            "format": "double"
          },
          "vwap": {
            "type": "number",
            "format": "double"
          },
          "count": {
            "type": "integer",
            "format": "int64"
          }
        },
        "additionalProperties": false
      },
      "ITickerItem": {
        "type": "object",
        "properties": {
          "symbol": {
            "type": "string",
            "nullable": true
          },
          "timestamp": {
            "type": "integer",
            "format": "int64"
          },
          "datetime": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "bidPrice": {
            "type": "number",
            "format": "double"
          },
          "bidQuantity": {
            "type": "number",
            "format": "double"
          },
          "askPrice": {
            "type": "number",
            "format": "double"
          },
          "askQuantity": {
            "type": "number",
            "format": "double"
          },
          "vwap": {
            "type": "number",
            "format": "double"
          },
          "openPrice": {
            "type": "number",
            "format": "double"
          },
          "closePrice": {
            "type": "number",
            "format": "double"
          },
          "highPrice": {
            "type": "number",
            "format": "double"
          },
          "lowPrice": {
            "type": "number",
            "format": "double"
          },
          "lastPrice": {
            "type": "number",
            "format": "double",
            "readOnly": true
          },
          "prevPrice": {
            "type": "number",
            "format": "double"
          },
          "changePrice": {
            "type": "number",
            "format": "double",
            "readOnly": true
          },
          "percentage": {
            "type": "number",
            "format": "double",
            "readOnly": true
          },
          "average": {
            "type": "number",
            "format": "double",
            "readOnly": true
          },
          "baseVolume": {
            "type": "number",
            "format": "double"
          },
          "quoteVolume": {
            "type": "number",
            "format": "double"
          },
          "pairVolume": {
            "type": "number",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "MakerType": {
        "enum": [
          "Unknown",
          "Maker",
          "Taker"
        ],
        "type": "string"
      },
      "MarketLimits": {
        "type": "object",
        "properties": {
          "quantity": {
            "$ref": "#/components/schemas/MarketMinMax"
          },
          "price": {
            "$ref": "#/components/schemas/MarketMinMax"
          },
          "amount": {
            "$ref": "#/components/schemas/MarketMinMax"
          }
        },
        "additionalProperties": false
      },
      "MarketMinMax": {
        "type": "object",
        "properties": {
          "min": {
            "type": "number",
            "format": "double"
          },
          "max": {
            "type": "number",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "MarketsGenericResponse": {
        "type": "object",
        "properties": {
          "Data": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/IMarketItem"
            },
            "nullable": true
          },
          "Links": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true
          },
          "Meta": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "OHLCVsGenericResponse": {
        "type": "object",
        "properties": {
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IOHLCVItem"
            },
            "nullable": true
          },
          "Links": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true
          },
          "Meta": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "OrderBookItem": {
        "type": "object",
        "properties": {
          "quantity": {
            "type": "number",
            "format": "double"
          },
          "price": {
            "type": "number",
            "format": "double"
          },
          "amount": {
            "type": "number",
            "format": "double"
          },
          "count": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "OrderBooks": {
        "type": "object",
        "properties": {
          "marketId": {
            "type": "string",
            "nullable": true
          },
          "symbol": {
            "type": "string",
            "nullable": true
          },
          "timestamp": {
            "type": "integer",
            "format": "int64"
          },
          "datetime": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "nonce": {
            "type": "integer",
            "format": "int64"
          },
          "bids": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderBookItem"
            },
            "nullable": true
          },
          "asks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderBookItem"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "OrderBooksGenericResponse": {
        "type": "object",
        "properties": {
          "Data": {
            "$ref": "#/components/schemas/OrderBooks"
          },
          "Links": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true
          },
          "Meta": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "OrderType": {
        "enum": [
          "Unknown",
          "Limit",
          "Market",
          "Position"
        ],
        "type": "string"
      },
      "SideType": {
        "enum": [
          "Unknown",
          "Bid",
          "Ask"
        ],
        "type": "string"
      },
      "StandardError": {
        "type": "object",
        "properties": {
          "ErrorCode": {
            "type": "string",
            "nullable": true
          },
          "Message": {
            "type": "string",
            "nullable": true
          },
          "Path": {
            "type": "string",
            "nullable": true
          },
          "Url": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "StandardRestErrorResponse": {
        "type": "object",
        "properties": {
          "Code": {
            "type": "string",
            "nullable": true
          },
          "Message": {
            "type": "string",
            "nullable": true
          },
          "Errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StandardError"
            },
            "nullable": true
          },
          "Description": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Ticker": {
        "type": "object",
        "properties": {
          "symbol": {
            "type": "string",
            "nullable": true
          },
          "timestamp": {
            "type": "integer",
            "format": "int64"
          },
          "datetime": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "bidPrice": {
            "type": "number",
            "format": "double"
          },
          "bidQuantity": {
            "type": "number",
            "format": "double"
          },
          "askPrice": {
            "type": "number",
            "format": "double"
          },
          "askQuantity": {
            "type": "number",
            "format": "double"
          },
          "vwap": {
            "type": "number",
            "format": "double"
          },
          "openPrice": {
            "type": "number",
            "format": "double"
          },
          "closePrice": {
            "type": "number",
            "format": "double"
          },
          "highPrice": {
            "type": "number",
            "format": "double"
          },
          "lowPrice": {
            "type": "number",
            "format": "double"
          },
          "lastPrice": {
            "type": "number",
            "format": "double",
            "readOnly": true
          },
          "prevPrice": {
            "type": "number",
            "format": "double"
          },
          "changePrice": {
            "type": "number",
            "format": "double"
          },
          "percentage": {
            "type": "number",
            "format": "double"
          },
          "average": {
            "type": "number",
            "format": "double"
          },
          "baseVolume": {
            "type": "number",
            "format": "double"
          },
          "quoteVolume": {
            "type": "number",
            "format": "double"
          },
          "pairVolume": {
            "type": "number",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "TickerGenericResponse": {
        "type": "object",
        "properties": {
          "Data": {
            "$ref": "#/components/schemas/Ticker"
          },
          "Links": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true
          },
          "Meta": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TickersGenericResponse": {
        "type": "object",
        "properties": {
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ITickerItem"
            },
            "nullable": true
          },
          "Links": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true
          },
          "Meta": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true
          }
        },
        "additionalProperties": false
      }
    }
  }
}