github.com/diadata-org/diadata@v1.4.593/documentation/api-1/api.md (about) 1 # API 2 3 ## Base URL 4 5 The DIA base url is `https://api.diadata.org/`. All API paths are sub-paths of this base URL. 6 7 ## Paths 8 9 ### GET /v1/chartPoints/ 10 11 Get chart points for an exchange. 12 Example: [https://api.diadata.org/v1/chartPoints/MEDIR120/GateIO/EOS](https://api.diadata.org/v1/chartPoints/MEDIR120/GateIO/EOS) 13 14 For a list of available trading places see: 15 [https://docs.diadata.org/documentation/api-1\#api-access](https://docs.diadata.org/documentation/api-1#api-access) 16 17 Query Params: 18 19 * scale \[string\]: scale 5m 30m 1h 4h 1d 1w. 20 21 Path Params: 22 23 * filter \[string\]: Some filter. \(for now MEDIR120 or MAIR120\) 24 * trading place \[string\]: Some trading place. 25 * symbol \[string\]: Some symbol from GET /v1/coins 26 27 _Remark:_ Careful! Successful responses can be rather large. 28 29 ### GET /v1/chartPointsAllExchanges/ 30 31 Get Symbol Details. 32 Example: [https://api.diadata.org/v1/chartPointsAllExchanges/MEDIR120/EOS](https://api.diadata.org/v1/chartPointsAllExchanges/MEDIR120/EOS) 33 34 35 Query Params: 36 37 * scale \[string\]: scale 5m 30m 1h 4h 1d 1w. 38 39 Path Params: 40 41 * filter \[string\]: Some filter. \(for now MEDIR120 or MAIR120\) 42 * symbol \[string\]: Some symbol. 43 44 _Remark:_ Careful! Successful responses can be rather large. 45 46 ### GET /v1/interestrate/ 47 48 Get value for a certain rate type. 49 Example: [https://api.diadata.org/v1/interestrate/ESTER/2020-04-20](https://api.diadata.org/v1/interestrate/ESTER/2020-04-20) 50 51 Get rate values for a range of timestamps using optional query parameters. 52 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) 53 54 Path Params: 55 56 * rateType \[string\]: Short hand notation/symbol for a rate 57 * date \[string\]: In the format yyyy:mm:dd date is an optional parameter. When omitted, the most recent value is returned. 58 59 Optional Query Params: 60 61 * dateInit, dateFinal \[string\]: In the format yyyy:mm:dd 62 63 ### GET /v1/quotation/ 64 65 Get a quotation. 66 Example: [https://api.diadata.org/v1/quotation/ETH](https://api.diadata.org/v1/quotation/ETH) 67 68 Path Params: 69 70 * symbol \[string\]: Some symbol. 71 72 ### GET /v1/supply/ 73 74 Get the circulating supply corresponding to a symbol. 75 Example: [https://api.diadata.org/v1/supply/ETH](https://api.diadata.org/v1/supply/ETH) 76 77 Path Params: 78 79 * symbol \[string\]: Some symbol. 80 81 ### POST /v1/supply 82 83 Post the circulating supply. 84 85 Query Params: 86 87 * Symbol \[string\]: Coin symbol. 88 * CirculatingSupply \[number\]: number of coins in circulating supply. 89 90 ### GET /v1/symbol/ 91 92 Get Symbol Details. 93 Example: [https://api.diadata.org/v1/symbol/ETH](https://api.diadata.org/v1/symbol/ETH) 94 95 Path Params: 96 97 * symbol \[string\]: Some symbol. 98 99 ### GET /v1/cviIndex 100 101 Get all values of the Crypto Volatility Index. 102 Example: [https://api.diadata.org/v1/cviIndex](https://api.diadata.org/v1/cviIndex) 103 104 * Parameters: starttime \[int\]: Unix timestamp where the array values should begin, endtime \[int\] Unix timestamp where the array should end 105 106 ### GET /v1/coins 107 108 Get a list of all available coins. 109 Example: [https://api.diadata.org/v1/coins](https://api.diadata.org/v1/coins) 110 111 ### GET /v1/exchanges 112 113 Get a list of all available trading places. 114 Example: [https://api.diadata.org/v1/exchanges](https://api.diadata.org/v1/exchanges) 115 116 ### GET /v1/interestrates 117 118 Get a list of all available interest rates along with some metadata on the rate such as first publication date and Issuing entity. 119 Example: [https://api.diadata.org/v1/interestrates](https://api.diadata.org/v1/interestrates) 120 121 ### GET /v1/pairs/ 122 123 Get a list of all available pairs. 124 Example: [https://api.diadata.org/v1/pairs](https://api.diadata.org/v1/pairs) 125 126 ### GET /v1/symbols 127 128 Get a list of all available symbols. 129 Example: [https://api.diadata.org/v1/symbols](https://api.diadata.org/v1/symbols) 130 131 ### Responses for all GET requests: 132 133 * 200: success. 134 135 Return the respective JSON object 136 137 * 404: Symbol not found. 138 139 [restApi.APIError](./#restapiapierror) 140 141 * 500: error. 142 143 [restApi.APIError](./#restapiapierror) 144 145 ## Use cases 146 147 ### Bash scripting 148 149 The API can be accessed through a Linux terminal by using curl. For example 150 `curl https://api.diadata.org/v1/interestrate/ESTER/2020-03-16 >> userPath/myFile.txt` 151 writes the return value of the GET request into `myFile.txt` for further processing. 152 153 ### Usage with Python 154 155 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. 156