Requirements
- Docker
Install
git clone https://github.com/JulianWe/price-bot.git
create .env file and replace following variables
RPC_URL="https://mainnet.infura.io/v3/<API_KEY>"
PRIVATE_KEY="<META_MASK_PK>"
ACCOUNT="<META_MASK_ADDRESS>"
Dockerfile
FROM node:10
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
COPY . .
EXPOSE 5001
CMD [ "node", "index.js" ]
start node application
docker build . -t price-bot
docker run -p 5001:5001 -d price-bot
docker logs <CONTAINER ID>
docker logs output:
Listening on 5001
Checking prices...
βββββββββββ¬ββββββββββββββ¬βββββββββββββββ¬βββββββββββββββ¬ββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββ
β (index) β Input Token β Output Token β Input Amount β Uniswap Return β Kyber Expected Rate β Kyber Min Return β Timestamp β
βββββββββββΌββββββββββββββΌβββββββββββββββΌβββββββββββββββΌββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββ€
β 0 β 'WETH' β 'DAI' β '1.0' β '1823.050080222385197257' β '1824.444499677818058964' β '1769.711164687483517195' β '2023-08-04T15:16:16-05:00' β
βββββββββββ΄ββββββββββββββ΄βββββββββββββββ΄βββββββββββββββ΄ββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββ
βββββββββββ¬ββββββββββββββ¬βββββββββββββββ¬βββββββββββββββ¬ββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββ
β (index) β Input Token β Output Token β Input Amount β Uniswap Return β Kyber Expected Rate β Kyber Min Return β Timestamp β
βββββββββββΌββββββββββββββΌβββββββββββββββΌβββββββββββββββΌββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββ€
β 0 β 'WETH' β 'KNC' β '1.0' β '2165.567525112236405307' β '2163.559973534022354486' β '2098.653174328001683851' β '2023-08-04T15:16:18-05:00' β
βββββββββββ΄ββββββββββββββ΄βββββββββββββββ΄βββββββββββββββ΄ββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββ
βββββββββββ¬ββββββββββββββ¬βββββββββββββββ¬βββββββββββββββ¬βββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββ
β (index) β Input Token β Output Token β Input Amount β Uniswap Return β Kyber Expected Rate β Kyber Min Return β Timestamp β
βββββββββββΌββββββββββββββΌβββββββββββββββΌβββββββββββββββΌβββββββββββββββββββββββββββΌβββββββββββββββββββββββββββΌβββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββ€
β 0 β 'WETH' β 'LINK' β '1.0' β '255.759663646868473434' β '256.183152153487629265' β '248.497657588883000387' β '2023-08-04T15:16:19-05:00' β
βββββββββββ΄ββββββββββββββ΄βββββββββββββββ΄βββββββββββββββ΄βββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββ
βββββββββββ¬ββββββββββββββ¬βββββββββββββββ¬βββββββββββββββ¬ββββββββββββββββββββββββ¬βββββββββββββββββββββββββ¬βββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββ
β (index) β Input Token β Output Token β Input Amount β Uniswap Return β Kyber Expected Rate β Kyber Min Return β Timestamp β
βββββββββββΌββββββββββββββΌβββββββββββββββΌβββββββββββββββΌββββββββββββββββββββββββΌβββββββββββββββββββββββββΌβββββββββββββββββββββββββΌββββββββββββββββββββββββββββββ€
β 0 β 'WETH' β 'MKR' β '1.0' β '1.40842670887409021' β '1.407213285137073579' β '1.364996886582961371' β '2023-08-04T15:16:21-05:00' β
βββββββββββ΄ββββββββββββββ΄βββββββββββββββ΄βββββββββββββββ΄ββββββββββββββββββββββββ΄βββββββββββββββββββββββββ΄βββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββ
βββββββββββ¬ββββββββββββββ¬βββββββββββββββ¬βββββββββββββββ¬ββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββ
β (index) β Input Token β Output Token β Input Amount β Uniswap Return β Kyber Expected Rate β Kyber Min Return β Timestamp β
βββββββββββΌββββββββββββββΌβββββββββββββββΌβββββββββββββββΌββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββ€
β 0 β 'WETH' β 'MATIC' β '1.0' β '2721.114705841861804087' β '2738.241277168906020416' β '2656.094038853838839803' β '2023-08-04T15:16:23-05:00' β
βββββββββββ΄ββββββββββββββ΄βββββββββββββββ΄βββββββββββββββ΄ββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββ
βββββββββββ¬ββββββββββββββ¬βββββββββββββββ¬βββββββββββββββ¬ββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββ
β (index) β Input Token β Output Token β Input Amount β Uniswap Return β Kyber Expected Rate β Kyber Min Return β Timestamp β
βββββββββββΌββββββββββββββΌβββββββββββββββΌβββββββββββββββΌββββββββββββββββββββββββββΌβββββββββββββββββββββββββββΌβββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββ€
β 0 β 'WETH' β 'UNI' β '1.0' β '300.69503002874059555' β '300.729612002838688019' β '291.707723642753527378' β '2023-08-04T15:16:24-05:00' β
βββββββββββ΄ββββββββββββββ΄βββββββββββββββ΄βββββββββββββββ΄ββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββ
βββββββββββ¬ββββββββββββββ¬βββββββββββββββ¬βββββββββββββββ¬ββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββ
β (index) β Input Token β Output Token β Input Amount β Uniswap Return β Kyber Expected Rate β Kyber Min Return β Timestamp β
βββββββββββΌββββββββββββββΌβββββββββββββββΌβββββββββββββββΌββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββ€
β 0 β 'WETH' β 'BAT' β '1.0' β '8422.429495474021270814' β '8414.253469305252487777' β '8161.825865226094913143' β '2023-08-04T15:16:25-05:00' β
βββββββββββ΄ββββββββββββββ΄βββββββββββββββ΄βββββββββββββββ΄ββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββ
βββββββββββ¬ββββββββββββββ¬βββββββββββββββ¬βββββββββββββββ¬βββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββ
β (index) β Input Token β Output Token β Input Amount β Uniswap Return β Kyber Expected Rate β Kyber Min Return β Timestamp β
βββββββββββΌββββββββββββββΌβββββββββββββββΌβββββββββββββββΌβββββββββββββββββββββββββββΌβββββββββββββββββββββββββββΌβββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββ€
β 0 β 'WETH' β 'SNX' β '1.0' β '735.899181541730798686' β '737.360824153132429237' β '715.239999428538456359' β '2023-08-04T15:16:27-05:00' β
βββββββββββ΄ββββββββββββββ΄βββββββββββββββ΄βββββββββββββββ΄βββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββ
βββββββββββ¬ββββββββββββββ¬βββββββββββββββ¬βββββββββββββββ¬βββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββ
β (index) β Input Token β Output Token β Input Amount β Uniswap Return β Kyber Expected Rate β Kyber Min Return β Timestamp β
βββββββββββΌββββββββββββββΌβββββββββββββββΌβββββββββββββββΌβββββββββββββββββββββββββββΌββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββ€
β 0 β 'WETH' β 'BNT' β '1.0' β '3654.65078538991621491' β '3749.785568122654750122' β '3637.292001078975107618' β '2023-08-04T15:16:29-05:00' β
βββββββββββ΄ββββββββββββββ΄βββββββββββββββ΄βββββββββββββββ΄βββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββ
βββββββββββ¬ββββββββββββββ¬βββββββββββββββ¬βββββββββββββββ¬ββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββ
β (index) β Input Token β Output Token β Input Amount β Uniswap Return β Kyber Expected Rate β Kyber Min Return β Timestamp β
βββββββββββΌββββββββββββββΌβββββββββββββββΌβββββββββββββββΌββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββΌββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββ€
β 0 β 'WETH' β '1INCH' β '1.0' β '5813.222182393980265241' β '5906.99832600060178057' β '5729.788376220583727152' β '2023-08-04T15:16:30-05:00' β
βββββββββββ΄ββββββββββββββ΄βββββββββββββββ΄βββββββββββββββ΄ββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββ
βββββββββββ¬ββββββββββββββ¬βββββββββββββββ¬βββββββββββββββ¬βββββββββββββββββββββββββββββ¬ββββββββββββββββββββββ¬βββββββββββββββββββ¬ββββββββββββββββββββββββββββββ
β (index) β Input Token β Output Token β Input Amount β Uniswap Return β Kyber Expected Rate β Kyber Min Return β Timestamp β
βββββββββββΌββββββββββββββΌβββββββββββββββΌβββββββββββββββΌβββββββββββββββββββββββββββββΌββββββββββββββββββββββΌβββββββββββββββββββΌββββββββββββββββββββββββββββββ€
β 0 β 'WETH' β 'GETH' β '1.0' β '13271.877616005472363949' β '0.0' β '0.0' β '2023-08-04T15:16:32-05:00' β
βββββββββββ΄ββββββββββββββ΄βββββββββββββββ΄βββββββββββββββ΄βββββββββββββββββββββββββββββ΄ββββββββββββββββββββββ΄βββββββββββββββββββ΄ββββββββββββββββββββββββββββββ
βββββββββββ¬ββββββββββββββ¬βββββββββββββββ¬βββββββββββββββ¬βββββββββββββββββββββββββββββ¬ββββββββββββββββββββββ¬βββββββββββββββββββ¬ββββββββββββββββββββββββββββββ
β (index) β Input Token β Output Token β Input Amount β Uniswap Return β Kyber Expected Rate β Kyber Min Return β Timestamp β
βββββββββββΌββββββββββββββΌβββββββββββββββΌβββββββββββββββΌβββββββββββββββββββββββββββββΌββββββββββββββββββββββΌβββββββββββββββββββΌββββββββββββββββββββββββββββββ€
β 0 β 'WETH' β 'GRT' β '1.0' β '17043.273371754954461314' β '0.0' β '0.0' β '2023-08-04T15:16:33-05:00' β
βββββββββββ΄ββββββββββββββ΄βββββββββββββββ΄βββββββββββββββ΄βββββββββββββββββββββββββββββ΄ββββββββββββββββββββββ΄βββββββββββββββββββ΄ββββββββββββββββββββββββββββββ
βββββββββββ¬ββββββββββββββ¬βββββββββββββββ¬βββββββββββββββ¬βββββββββββββββββββββββββββ¬ββββββββββββββββββββββ¬βββββββββββββββββββ¬ββββββββββββββββββββββββββββββ
β (index) β Input Token β Output Token β Input Amount β Uniswap Return β Kyber Expected Rate β Kyber Min Return β Timestamp β
βββββββββββΌββββββββββββββΌβββββββββββββββΌβββββββββββββββΌβββββββββββββββββββββββββββΌββββββββββββββββββββββΌβββββββββββββββββββΌββββββββββββββββββββββββββββββ€
β 0 β 'WETH' β 'ENS' β '1.0' β '135.415064238099413736' β '0.0' β '0.0' β '2023-08-04T15:16:35-05:00' β
βββββββββββ΄ββββββββββββββ΄βββββββββββββββ΄βββββββββββββββ΄βββββββββββββββββββββββββββ΄ββββββββββββββββββββββ΄βββββββββββββββββββ΄ββββββββββββββββββββββββββββββ
βββββββββββ¬ββββββββββββββ¬βββββββββββββββ¬βββββββββββββββ¬βββββββββββββββββββββββββββ¬ββββββββββββββββββββββ¬βββββββββββββββββββ¬ββββββββββββββββββββββββββββββ
β (index) β Input Token β Output Token β Input Amount β Uniswap Return β Kyber Expected Rate β Kyber Min Return β Timestamp β
βββββββββββΌββββββββββββββΌβββββββββββββββΌβββββββββββββββΌβββββββββββββββββββββββββββΌββββββββββββββββββββββΌβββββββββββββββββββΌββββββββββββββββββββββββββββββ€
β 0 β 'WETH' β 'EWTB' β '1.0' β '733.428875784256823646' β '0.0' β '0.0' β '2023-08-04T15:16:36-05:00' β
βββββββββββ΄ββββββββββββββ΄βββββββββββββββ΄βββββββββββββββ΄βββββββββββββββββββββββββββ΄ββββββββββββββββββββββ΄βββββββββββββββββββ΄ββββββββββββββββββββββββββββββ
βββββββββββ¬ββββββββββββββ¬βββββββββββββββ¬βββββββββββββββ¬βββββββββββββββββββββββββ¬ββββββββββββββββββββββ¬βββββββββββββββββββ¬ββββββββββββββββββββββββββββββ
β (index) β Input Token β Output Token β Input Amount β Uniswap Return β Kyber Expected Rate β Kyber Min Return β Timestamp β
βββββββββββΌββββββββββββββΌβββββββββββββββΌβββββββββββββββΌβββββββββββββββββββββββββΌββββββββββββββββββββββΌβββββββββββββββββββΌββββββββββββββββββββββββββββββ€
β 0 β 'WETH' β 'OCEAN' β '1.0' β '0.000000001822987575' β '1827.65529' β '1772.8256313' β '2023-08-04T15:16:38-05:00' β
βββββββββββ΄ββββββββββββββ΄βββββββββββββββ΄βββββββββββββββ΄βββββββββββββββββββββββββ΄ββββββββββββββββββββββ΄βββββββββββββββββββ΄ββββββββββββββββββββββββββββββ
βββββββββββ¬ββββββββββββββ¬βββββββββββββββ¬βββββββββββββββ¬βββββββββββββββββββββββββ¬ββββββββββββββββββββββ¬βββββββββββββββββββββ¬ββββββββββββββββββββββββββββββ
β (index) β Input Token β Output Token β Input Amount β Uniswap Return β Kyber Expected Rate β Kyber Min Return β Timestamp β
βββββββββββΌββββββββββββββΌβββββββββββββββΌβββββββββββββββΌβββββββββββββββββββββββββΌββββββββββββββββββββββΌβββββββββββββββββββββΌββββββββββββββββββββββββββββββ€
β 0 β 'WETH' β 'UBT' β '1.0' β '0.000002704205388709' β '27015.75180402' β '26205.2792498994' β '2023-08-04T15:16:39-05:00' β
βββββββββββ΄ββββββββββββββ΄βββββββββββββββ΄βββββββββββββββ΄βββββββββββββββββββββββββ΄ββββββββββββββββββββββ΄βββββββββββββββββββββ΄ββββββββββββββββββββββββββββββ