1.0.0 • Published 4 years ago
paraswap-api v1.0.0
ParaSwap API
Run the server:
yarn install
Create a .env file with this content:
PORT=4343
INFURA_KEY=YOUR_INFURA_KEY
HTTP_PROVIDER==URL_TO_HTTP_PROVIDER
PARASWAP_AGGREGATOR=https://paraswap-aggregator.herokuapp.com
NUM_WORKERS=1
yarn dev
To make a price request:
GET http://localhost:4343/api/v2/prices/?from=DAI&to=ETH&amount=100000000000000000
To build a transaction:
POST http://localhost:4343/api/v2/prices/?from=DAI&to=ETH&amount=100000000000000000
body: {network, priceRoute, from, to, srcAmount, destAmount, userAddress, receiver, donatePercent, referrer, gasPrice}
1.0.0
4 years ago