Skip to content

Commit 46bd2c6

Browse files
author
Your Name
committed
app-win
1 parent ff6c7dd commit 46bd2c6

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

app.js

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ console.log(gethIPC)
2323
var my_provider = new Web3.providers.HttpProvider(gethIPC)
2424

2525
var w3 = new Web3(my_provider)
26-
var biggest = -50
26+
var biggest = -100
2727
var syms2 = {}
2828
var syms = {}
2929
var ignore = []
@@ -149,7 +149,7 @@ bal = bal * prices[coinGeckoNames[tok]]
149149
var orders = r['response']['summary'][0]['trades'][0]['orders']
150150

151151
var sym = token['symbol']
152-
// console.log(sym)
152+
console.log(sym)
153153
var arbWins = {}
154154
var tokWin = {}
155155
var arbWinR2s = {}
@@ -219,7 +219,7 @@ bal = bal * prices[coinGeckoNames[tok]]
219219

220220

221221
var arbpotential = 100 * ((parseFloat(tx1price2) / parseFloat(tx1price) - 1))
222-
console.log('arb potential: ' + arbpotential + ': ' + tradeTokens[tok])
222+
// console.log('arb potential: ' + arbpotential + ': ' + tradeTokens[tok])
223223
arbPots[token['symbol']].push(arbpotential)
224224
//console.log(arbPots[token['symbol']])
225225
if (arbpotential > arbWins[token['symbol']] && arbpotential < maxArb){
@@ -404,14 +404,19 @@ async function doTx(transaction){
404404
}
405405
});
406406
}
407-
var thelength = 450 * tradeTokens.length
407+
var thelengthc = 0
408+
var thelength
408409
async function start() {
409-
r = await rp('https://api.totle.com/tokens')
410+
r = await rp('https://api.0x.org/swap/v0/tokens')
410411
r = JSON.parse(r)
411412

412413
tokens = []
413-
for (var token in r['tokens']) {
414-
tokens.push(r['tokens'][token])
414+
for (var token in r['records']) {
415+
thelengthc++
416+
thelength = (thelengthc * tradeTokens.length) / 1.5
417+
console.log(thelength)
418+
console.log(r['records'][token])
419+
tokens.push(r['records'][token])
415420
}
416421

417422

dexArb-packaged-executables.zip

1.71 KB
Binary file not shown.

0 commit comments

Comments
 (0)