This is a simple project that shows how to use the DutchX API.
The API is an alternative and easier way to access to the information on the smart contracts.
It was built to make the information more accessible, so it hides the barriers that a newcomer may find in the Ethereum development.
The API and it's documentation is avaliable for:
- Mainnet: https://dutchx.d.exchange/api
- Rinkeby: https://dutchx-rinkeby.d.exchange/api
Check out also the DutchX Documentation
To get started, you just have to make a regular REST call using any http client.
For example, in node you could use got to make the http requests:
yarn add got --save # Or: npm install got --save
Then we can invoke any of the Api operations.
For example, to get the complete list of tokens pairs (markets) that has been
added to the DutchX we can use the /markets
endpoint:
got = require('got');
const { body: markets } = await got('https://dutchx.d.exchange/api/v1/markets', {
json: true
})
The complete example can be seen in here.
You can run it with:
yarn start # Or: npm start
We should see as a result the list of tokens: