Skip to content

Commit

Permalink
GitBook: [master] 4 pages modified
Browse files Browse the repository at this point in the history
  • Loading branch information
jppade authored and gitbook-bot committed Mar 18, 2020
1 parent 46f8501 commit d1a011a
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 55 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,18 @@ All DIA data points can be used in Ethereum Smart Contracts. We provide oracle s

### Alpha Version - dApp Registry

[SIX/F10 PSD II Sandbox](https://f10-sandbox-portal.apps.ndgit.com/#/apis) - PSD II and pricing data for FinTechs
[SIX/F10 PSD II Sandbox](https://f10-sandbox-portal.apps.ndgit.com/#/apis) - PSD II and pricing data for FinTechs

[Open-Source Calculation Agent](https://blockstate.com/decentral-calculation-agent/)

[Swiss ISIN note using DIA data](https://en.bitcoinwiki.org/wiki/Index_Fund)
[Swiss ISIN note using DIA data](https://en.bitcoinwiki.org/wiki/Index_Fund)

[CoinHub](http://coinhub.diadata.org) - A transparent, open-source alternative to CMC

[Neufund](https://blog.neufund.org/neufund-1-1-is-live-on-mainnet-db35d77b2ef2)
[Neufund](https://blog.neufund.org/neufund-1-1-is-live-on-mainnet-db35d77b2ef2)

[Helena/Consensys](https://helena.network) - Delivering real-time blockchain fundamental insights



### How to contribute

DIA is open for anyone to contribute and we always welcome pull requests. We also provide tasks on [Gitcoin](https://gitcoin.co/), a collaboration tool focused on cryptocurrency projects.
Expand Down
2 changes: 0 additions & 2 deletions SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,3 @@
* [Licence Agreement](licence-agreement.md)
* [Disclaimer](disclaimer.md)

## DIAgram

23 changes: 23 additions & 0 deletions api/docs/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,25 @@
# docs

## Getting Super Powers

Becoming a super hero is a fairly straight forward process:

```
$ give me super-powers
```

{% hint style="info" %}
Super-powers are granted randomly so please submit an issue if you're not happy with yours.
{% endhint %}

Once you're strong enough, save the world:

{% code title="hello.sh" %}
```bash
# Ain't no code for that yet, sorry
echo 'You got to trust me on this, I saved the world'
```
{% endcode %}



91 changes: 43 additions & 48 deletions api/docs/api.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# diadata.org API

The world's crowd-driven financial data community has a professional API made for you.
Decentral and transparent by design
Decentral and transparent by design.
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.

**Find the right data for your needs**
Expand All @@ -27,17 +27,18 @@ The DIA base url is `https://api.diadata.org/`. All API paths are sub-paths of t

### GET /v1/chartPoints/

Get chart points for.
Get chart points for an exchange.
Example: [https://api.diadata.org/v1/chartPoints/MEDIR120/GateIO/EOS](https://api.diadata.org/v1/chartPoints/MEDIR120/GateIO/EOS)

Query Params:

* scale \[string\]: scale 5m 30m 1h 4h 1d 1w.

Path Params:

* symbol \[string\]: Some symbol.
* exchange \[string\]: Some exchange.
* filter \[string\]: Some filter.
* filter \[string\]: Some filter. \(for now MEDIR120 or MAIR120\)
* trading place \[string\]: Some trading place.
* symbol \[string\]: Some symbol from GET /v1/coins

Responses:

Expand All @@ -53,18 +54,21 @@ Responses:

[restApi.APIError](api.md#restapiapierror)

_Remark:_ Careful! Succesful responses can be rather large.

### GET /v1/chartPointsAllExchanges/

Get Symbol Details.
Get Symbol Details.
Example: [https://api.diadata.org/v1/chartPointsAllExchanges/MEDIR120/EOS](https://api.diadata.org/v1/chartPointsAllExchanges/MEDIR120/EOS)

Query Params:

* scale \[string\]: scale 5m 30m 1h 4h 1d 1w.

Path Params:

* filter \[string\]: Some filter. \(for now MEDIR120 or MAIR120\)
* symbol \[string\]: Some symbol.
* filter \[string\]: Some filter.

Responses:

Expand All @@ -80,9 +84,12 @@ Responses:

[restApi.APIError](api.md#restapiapierror)

_Remark:_ Careful! Succesful responses can be rather large.

### GET /v1/coins

Get coins.
Get all available coins.
Example: [https://api.diadata.org/v1/coins](https://api.diadata.org/v1/coins)

Responses:

Expand All @@ -96,7 +103,8 @@ Responses:

### GET /v1/pairs/

Get pairs.
Get all available pairs.
Example: [https://api.diadata.org/v1/pairs](https://api.diadata.org/v1/pairs)

Responses:

Expand All @@ -110,7 +118,8 @@ Responses:

### GET /v1/quotation/

Get quotation.
Get a quotation.
Example: [https://api.diadata.org/v1/quotation/ETH](https://api.diadata.org/v1/quotation/ETH)

Path Params:

Expand Down Expand Up @@ -151,7 +160,8 @@ Responses:

### GET /v1/supply/

Get supply.
Get the circulating supply corresponding to a symbol.
Example: [https://api.diadata.org/v1/supply/ETH](https://api.diadata.org/v1/supply/ETH)

Path Params:

Expand Down Expand Up @@ -195,7 +205,8 @@ Responses:

### GET /v1/symbols

Get all symbols list.
Get all available symbols.
Example: [https://api.diadata.org/v1/symbols](https://api.diadata.org/v1/symbols)

Query Params:

Expand All @@ -216,65 +227,49 @@ Responses:

[restApi.APIError](api.md#restapiapierror)

## Definitions

### dia.Pair

* exchange _\(string\)_ - foreignName _\(string\)_ - ignore _\(boolean\)_ - symbol _\(string\)_

**dia.Supply**

* block _\(integer\)_ - circulatingSupply _\(number\)_ - name _\(string\)_ - source _\(string\)_ - symbol _\(string\)_ - time _\(string\)_

**dia.Symbols**
### GET /v1/interestrate/

* symbols _\(array\)_ - type: string
Get interest rate.
Example: [https://api.diadata.org/v1/interestrate/ESTER/2020-03-16](https://api.diadata.org/v1/interestrate/ESTER/2020-03-16)

**dia.Trade**

* estimatedUSDPrice _\(number\)_ - foreignTradeID _\(string\)_ - pair _\(string\)_ - price _\(number\)_ - source _\(string\)_ - symbol _\(string\)_ - time _\(string\)_ - volume _\(number\)_

**models.Change**
Path Params:

* usd _\(array\)_ - [models.CurrencyChange](api.md#modelscurrencychange)
* rateType \[string\]: Short hand notation for a rate
* date \[string\]: In the format yyyy:mm:dd date is an optional parameter. When omitted, the most recent value is returned.

**models.Coin**
Responses:

* circulatingSupply _\(number\)_ - name _\(string\)_ - price _\(number\)_ - priceYesterday _\(number\)_ - symbol _\(string\)_ - time _\(string\)_ - volumeYesterdayUSD _\(number\)_
* 200: success.

**models.Coins**
[models.InterestRate](api.md#modelsquotation)

* change _\(object\)_ - coins _\(array\)_ - [models.Coin](api.md#modelscoin) - completeCoinList _\(array\)_ - [models.CoinSymbolAndName](api.md#modelscoinsymbolandname)
* 404: Symbol not found.

**models.CoinSymbolAndName**
[restApi.APIError](api.md#restapiapierror)

* name _\(string\)_ - symbol _\(string\)_
* 500: error.

**models.CurrencyChange**
[restApi.APIError](api.md#restapiapierror)

* rate _\(number\)_ - rateYesterday _\(number\)_ - symbol _\(string\)_
## Use cases

**models.Pairs**
### Bash scripting

* pairs _\(array\)_ - [dia.Pair](api.md#diapair)
The API can be accessed through a Linux terminal by using curl. For example
`curl https://api.diadata.org/v1/interestrate/ESTER/2020-03-16 >> userPath/myFile.txt`
writes the return value of the GET request into `myFile.txt` for further processing.

**models.Points**
### Usage with Python

* dataPoints _\(string\)_
The object obtained in an API GET request is a string which complies with Python syntax. It can be cast into a list or dictionary resp. using Python's `eval(string)` function.

**models.Quotation**

* name _\(string\)_ - price _\(number\)_ - priceYesterday _\(number\)_ - source _\(string\)_ - symbol _\(string\)_ - time _\(string\)_ - volumeYesterdayUSD _\(number\)_

**models.SymbolDetails**

* change _\(object\)_ - coin _\(object\)_ - exchanges _\(array\)_ - [models.SymbolExchangeDetails](api.md#modelssymbolexchangedetails) - gfx1 _\(object\)_ - rank _\(integer\)_

**models.SymbolExchangeDetails**

* lastTrades _\(array\)_ - [dia.Trade](api.md#diatrade) - name _\(string\)_ - price _\(number\)_ - priceYesterday _\(number\)_ - time _\(string\)_ - volumeYesterdayUSD _\(number\)_

**restApi.APIError**

* errorcode _\(integer\)_ - errormessage _\(string\)_

0 comments on commit d1a011a

Please sign in to comment.