github.com/diadata-org/diadata@v1.4.593/documentation/api-1.md (about) 1 # API Documentation 2 3 The world's crowd-driven financial data community has a professional API made for you. 4 Decentral and transparent by design. 5 With our decentral approach to data verification, you can gain a deep insight into current and past pricing, volume and exchange info so you can make the right decisions to stay ahead of the game. 6 7 {% api-method method="get" host="" path="" %} 8 {% api-method-summary %} 9 10 {% endapi-method-summary %} 11 12 {% api-method-description %} 13 14 {% endapi-method-description %} 15 16 {% api-method-spec %} 17 {% api-method-request %} 18 {% api-method-path-parameters %} 19 {% api-method-parameter name="" type="string" required=false %} 20 21 {% endapi-method-parameter %} 22 {% endapi-method-path-parameters %} 23 {% endapi-method-request %} 24 25 {% api-method-response %} 26 {% api-method-response-example httpCode=200 %} 27 {% api-method-response-example-description %} 28 29 {% endapi-method-response-example-description %} 30 31 ``` 32 33 ``` 34 {% endapi-method-response-example %} 35 {% endapi-method-response %} 36 {% endapi-method-spec %} 37 {% endapi-method %} 38 39 **Find the right data for your needs** 40 Show your users the most transparent data on the market with our API. Whether you're building a financial service, a portfolio management tool, a new media offering, or more, we have the most advanced and updated data on the market for your product. 41 For Oracle usage see [github](https://github.com/diadata-org/diadata/tree/master/documentation/methodology/oracles.md). 42 43 **Backtest your strategies** 44 Use the most efficient and transparent crypto data to run simulations and backtest your trading or investing strategies. With crowd-aggregated hundreds of exchanges you can be sure that you're getting the right picture every single time. 45 46 **Run Experiments** 47 Build your own models with our data, to further your interest or just for fun. With our flexible and powerful API, we provide you with a set of data that will help you draw insights and make conclusions. 48 49 **Request your data** 50 Set a bounty on gitcoin.io or drop us [line](mailto:API@diadata.org). 51 52 Version: 1.0 53 54 ## Base URL 55 56 The DIA base url is `https://api.diadata.org/`. All API paths are sub-paths of this base URL. 57 58 ## Paths 59 60 ### GET /v1/chartPoints/ 61 62 Get chart points for an exchange. 63 Example: [https://api.diadata.org/v1/chartPoints/MEDIR120/GateIO/EOS](https://api.diadata.org/v1/chartPoints/MEDIR120/GateIO/EOS) 64 65 For a list of available trading places see: 66 [https://app.gitbook.com/@diadata/s/test-space/~/drafts/-M4DjNVf9NcISNyqFK4p/documentation/index](https://app.gitbook.com/@diadata/s/test-space/~/drafts/-M4DjNVf9NcISNyqFK4p/documentation/index) 67 68 Query Params: 69 70 * scale \[string\]: scale 5m 30m 1h 4h 1d 1w. 71 72 Path Params: 73 74 * filter \[string\]: Some filter. \(for now MEDIR120 or MAIR120\) 75 * trading place \[string\]: Some trading place. 76 * symbol \[string\]: Some symbol from GET /v1/coins 77 78 _Remark:_ Careful! Successful responses can be rather large. 79 80 ### GET /v1/chartPointsAllExchanges/ 81 82 Get Symbol Details. 83 Example: [https://api.diadata.org/v1/chartPointsAllExchanges/MEDIR120/EOS](https://api.diadata.org/v1/chartPointsAllExchanges/MEDIR120/EOS) 84 85 86 Query Params: 87 88 * scale \[string\]: scale 5m 30m 1h 4h 1d 1w. 89 90 Path Params: 91 92 * filter \[string\]: Some filter. \(for now MEDIR120 or MAIR120\) 93 * symbol \[string\]: Some symbol. 94 95 _Remark:_ Careful! Successful responses can be rather large. 96 97 ### GET /v1/interestrate/ 98 99 Get value for a certain rate type. 100 Example: [https://api.diadata.org/v1/interestrate/ESTER/2020-04-20](https://api.diadata.org/v1/interestrate/ESTER/2020-04-20) 101 102 Get rate values for a range of timestamps using optinal query parameters. 103 Example: [https://api.diadata.org/v1/interestrate/ESTER?dateInit=2020-02-20&dateFinal=2020-04-16](https://api.diadata.org/v1/interestrate/ESTER?dateInit=2020-02-20&dateFinal=2020-04-16) 104 105 Path Params: 106 107 * rateType \[string\]: Short hand notation/symbol for a rate 108 * date \[string\]: In the format yyyy:mm:dd date is an optional parameter. When omitted, the most recent value is returned. 109 110 Optional Query Params: 111 112 * dateInit, dateFinal \[string\]: In the format yyyy:mm:dd 113 114 ### GET /v1/quotation/ 115 116 Get a quotation. 117 Example: [https://api.diadata.org/v1/quotation/ETH](https://api.diadata.org/v1/quotation/ETH) 118 119 Path Params: 120 121 * symbol \[string\]: Some symbol. 122 123 ### GET /v1/supply/ 124 125 Get the circulating supply corresponding to a symbol. 126 Example: [https://api.diadata.org/v1/supply/ETH](https://api.diadata.org/v1/supply/ETH) 127 128 Path Params: 129 130 * symbol \[string\]: Some symbol. 131 132 ### POST /v1/supply 133 134 Post the circulating supply. 135 136 Query Params: 137 138 * Symbol \[string\]: Coin symbol. 139 * CirculatingSupply \[number\]: number of coins in circulating supply. 140 141 ### GET /v1/symbol/ 142 143 Get Symbol Details. 144 Example: [https://api.diadata.org/v1/symbol/ETH](https://api.diadata.org/v1/symbol/ETH) 145 146 Path Params: 147 148 * symbol \[string\]: Some symbol. 149 150 ### GET /v1/coins 151 152 Get a list of all available coins. 153 Example: [https://api.diadata.org/v1/coins](https://api.diadata.org/v1/coins) 154 155 ### GET /v1/exchanges 156 157 Get a list of all available trading places. 158 Example: [https://api.diadata.org/v1/exchanges](https://api.diadata.org/v1/exchanges) 159 160 ### GET /v1/interestrates 161 162 Get a list of all available interest rates along with some metadata on the rate such as first publication date and Issuing entity. 163 Example: [https://api.diadata.org/v1/interestrates](https://api.diadata.org/v1/interestrates) 164 165 ### GET /v1/pairs/ 166 167 Get a list of all available pairs. 168 Example: [https://api.diadata.org/v1/pairs](https://api.diadata.org/v1/pairs) 169 170 ### GET /v1/symbols 171 172 Get a list of all available symbols. 173 Example: [https://api.diadata.org/v1/symbols](https://api.diadata.org/v1/symbols) 174 175 ### Responses for all GET requests: 176 177 * 200: success. 178 179 Return the respective JSON object 180 181 * 404: Symbol not found. 182 183 [restApi.APIError](api-1.md#restapiapierror) 184 185 * 500: error. 186 187 [restApi.APIError](api-1.md#restapiapierror) 188 189 ## Use cases 190 191 ### Bash scripting 192 193 The API can be accessed through a Linux terminal by using curl. For example 194 `curl https://api.diadata.org/v1/interestrate/ESTER/2020-03-16 >> userPath/myFile.txt` 195 writes the return value of the GET request into `myFile.txt` for further processing. 196 197 ### Usage with Python 198 199 The JSON object obtained in an API GET request complies with Python syntax. It can be cast into a list or dictionary resp. using Python's `eval(string)` function. 200