Pages:
Author

Topic: Python arbitrage script between two Bitcoin sports exchanges! (Read 6612 times)

newbie
Activity: 2
Merit: 0
Hi party fans,

I've built a script that takes their maker fee rebate on the perpetual market, along with it's volume, and creates massive returns. I think the volume is a bit over-the-top these last few days, but evne at 1/100 the trades this venture is still highly profitable Smiley Because there's literally 10s of millons of orders being taken in a day, there's healthy room for more than one person to be the maker on some of those without any notceable competition.

Look! In 16 hours more than 4000% returns on 2.27 seed BTC!

https://docs.google.com/spreadsheets/d/1C1gdUs9ULA7qc6tO4JZcucHxFd4F6dfR-SUmPUYtRYE/edit#gid=0

Look! in 6 hours 600% returns!

https://docs.google.com/spreadsheets/d/1y_yQbV3e0pXqcMIG-h55oArJ-vEA8SEs5WBK6fpq62E/edit#gid=0

If you don't like sheets links, here's this:

https://drive.google.com/file/d/1KN16BgznUwcWVNKAx7tZwVA34s036xuw/view?usp=sharing https://drive.google.com/file/d/1vHRgJa_-4-XhCZivGbhOJ7YQUcD5xZoo/view?usp=sharing

The newest version of the bot includes many features to try to avoid a margin call, and at present never uses more than 1/3 the equity available on a given account.

From both my accounts, here is the summary:

Acc #1:

fees paid 69.08455994 change in balanec 157.334570159999 fees earned, after paying the above fees -234.01579655

csv export:

https://drive.google.com/file/d/1qyLluU8iS_bemh6Dwdl_7qfToqs-BiNB/view?usp=sharing

Acc #2:

fees paid 19.10605269 fees (rebates) earned after paying above fees -251.62075451 Change in balance 250.85156822

csv export:

https://drive.google.com/file/d/1bI53D78TCwACYwNMss1vFSVs8QeixAGu/view?usp=sharing

    Download, install node, npm (any machine) 1.5 git clone https://github.com/DunnCreativeSS/marketmaker
    run npm i in the directory of ths git repo
    Open deribit.js
    Change key, secret to appropriate values 4.5 in views/index.ejs,
    Run on TestNet
    When you want to run on livenet, take out the ', 'https://test.deribit.com'' section of var restClient = new RestClient('key','secret'

It should look like:

var restClient = new RestClient('key','secret')

    I do ask that you sign up to my Deribit ref lnk, so I can get value from your taker trades.

https://www.deribit.com/reg-4393.9303

    Yes, I fully intend on using some of the realized profits to repeat this success in other maker fee rebate exchanges (like BitMex).

    More details

To Prove for Viability Consistent over all types of markets, but identify when it does better From forward testing on testnet, it’s apparent: An upwards trend will cause more Sells than Buys A downwards trend will cause more Buys than Sells In each above case, until such time as there are more units in a position than the lower or higher threshold, lower being sell/buy back 1/3 of position as maker and higher threshold being sell/buy back 1/2 of position as taker A spike in volume will cause more buys/sells Until such point as it exceeds a maximum threshold for buys/sells in given 8s period, in which case it takes a 20s break from buying/selling Until such point as a given position PNL is <-0.30%, when it liquidates position Until such point as a given total equity falls 1.5% in a given 60s period, when it liquidates open positions A downturn in volume causes less profits But still shows a steady upwards movement on the graph, although decelerated Sunk costs of dev To deploy any number users to livenet Deribit $0, put in their API keys to my testnet script and switch to livenet To deploy to other exchanges, BTC futures with leverage Max. 40 hour’s effort by an effective resource or team On other exchanges, incorporate other coins or lower leverage Max. add’l 20 hour’s effort by an effective resource or team, given the buy/sell and other logic already exists from #2 Scalability given current market liquidity and volume A spot check shows top 10 bids/asks @ 40k contracts ($10 apiece) of non-hidden orders on the books for both testnet and livenet Livenet has 25 trades within last 3 minutes, Testnet within 1 minute I expect the scalability for a single deploy at 2-10 BTC seed will perform like the bot on testnet. Additional bots on Deribit would contribute to maker volume, if we had $400 000 (at 100x leverage, so $4000 on both sides of the books so $8000) it would double non-hidden orders. If we had $4000 leveraged the bot would enter orders of 1250 contracts. @ $32 difference, measuring each bid/ask by $2, there is roughly $3m on both sides of the books, $30 000 at 100x leverage, which we’d double with our own $30 000. If we had $3m leveraged the bot would enter orders of 10 000 contracts. Add’l exchanges, add’l liquidy and volume.

Smiley
newbie
Activity: 1
Merit: 0
Hello,

Is this still active? PM me please - I'm a UK-based arbitrageur.
newbie
Activity: 4
Merit: 0
Since this time yesterday, there have been 147 arbitrage opportunities.

I've been doing arbitrage betting for 10 years. We should talk Smiley
Send me a PM (I can't send you one).
copper member
Activity: 42
Merit: 0
hero member
Activity: 853
Merit: 500
Is this matter being updated?
Have real interest,
Thanks.
newbie
Activity: 1
Merit: 0
Interested. I can also help with the 3+ way lines. I'll also register for a bonus for you
newbie
Activity: 1
Merit: 0
Hey everyone,

I've developed a Python script that enables arbitrage betting between two Bitcoin-enabled sports exchanges (via API - leaving them nameless in public in case they don't approve of arb). While there're still some kinks, it should work properly within the next few hours (just pending a few bets I'd made to pay out and for me to test my new version).

I'd like to offer the script in return for people signing up for one of the exchanges using my referral link Smiley The other one, unfortunately, doesn't have a ref program. No upfront cost, no subscription, nadda. I profit when you profit Smiley (and this exchange only takes a % on your wins with that particular exchange).

What's arb betting?

Pinnacle describes it best (because they encourage arbers):

https://www.pinnacle.com/en/promotions/arbitrage-friendly
https://www.pinnacle.com/en/betting-articles/Betting-Strategy/what-is-arbitrage-betting/PSWJPK7ECRAXM2BP

What my script does:

Compares all Tennis events over the next 14 or so hours between the two exchanges, then calculates which competitions it can make a 5-15% profit from by betting both sides of the event. It then calculates the appropriate amounts to bet according to how much volume of unmatched bets there are at that price. It then places the opposing bets for either the max. value it can (based on whichever outcome's volume is lower), or the max. value the current balance on the exchanges will allow for (divided by 6) (this is a bit testy because one of the exchanges doesn't return current avail. balance, just current balance since the last event - so while there's open bets, the current bal. from last event doesn't match real available balance - to offset this the script takes the lower of either balance on either exchanges for calculation). Then, on next run (which is constant in a loop), the script would notice if there's still an arb opportunity that exists with the next layer of volume/s.

Note that the APIs don't allow auto-withdrawal of funds (I'm not going to steal your BTC).

What you'd need:
1. Preferably you'll have a Linux box, access to a free Linux VPS (Amazon AWS EC2 free tier would do the trick), or some know-how surrounding getting Python to work on Windows / Mac. I'll help you set up the script, sign up to the two exchanges, and coach you should you have any questions.
2. Some BTC - there's a minimum 1 mBTC (0.001 btc) for bets on one exchange. The other apparently has no min. bet.

Next steps for the script:

1. I'd like to repurpose the script for soccer (the only other sport the two bookies have in common) but the issue is that I don't really understand 3-outcome betting (whereas tennis has two players and two outcomes, there're far fewer betting types).
2. Integrate with fiat bookie/exchange APIs (not sure I want to do this - the ease of BTC withdraw/deposit compared to fiat makes this a more interesting proposition for BTC exchanges (plus that much is already done for tennis)).

I see no issue with sharing the script as a) I don't have much of a bankroll and this would allow me to have some financial benefit while benefitting everyone else, b) I see many, many arb opportunities (at present there are 2, with volumes at those odds of 1-4 btc).

I'll have screenshot proof of % gains from specific Tennis matches to interested parties via PM.

Hello

I wasn't registered here because I still haven't dig in bitcoins, but what you are trying to do is more or less what I'm intending to do with regular (I think you refer them as fiat) bookmakers. Three way options is not an issue for me, you just have to dutch two of them and calculate possible profit. Unfortunately, as I'm in stage 1 I only have basic Bet365 scraping, and not an actual arbing system, but if you want to share your code I´d be willing to have a look at it, and if you do have problems with calculating three way bets, help you there

Best Regards
hero member
Activity: 706
Merit: 500
Very interested
newbie
Activity: 1
Merit: 0
Hey h3xh3x!

I'm really interested in this code if you could PM to me, I've already signed up with your referral.

Thanks!
hero member
Activity: 853
Merit: 500
Hi @h3xh3x
Nice project, just waiting for a easier platform like a site which give us the arb oppotunities, since I have no knowledgement on Linux or programming.
Already registed BetBtc through your referral link, OK?

 Wink
member
Activity: 113
Merit: 10
Since this time yesterday, there have been 147 arbitrage opportunities.
member
Activity: 72
Merit: 10
my other demo: http://codeandmore.info/btce/
skype: codeandmore
member
Activity: 113
Merit: 10
Hey everyone,

Personal PMs to follow for those that'd PMed me. My account here is still limited so there's a delay between this post and PMs.

My BetBTC / Fairlay bot turned out to not find profitable arbitrage opportunities. I turned to other places to a) place a bet via API b) that proved to have volume available for Arb bets c) allowed BTC deposits. I found these guys:

https://www.asianodds88.com/Login.aspx

They aggregate odds from a number of bookies (across Asia + Pinnacle), and allow betting via API. Their minimum advertised deposit on their site for Bitcoin is 0.05 BTC but their support folks have said that their minimum is the equivalent their BTC partner's rates are for $100 EUR. There's no minimum withdrawal for BTC.

The script is still largely untested, given that they'd given me a $250 EUR credit and are unable to give me more credit at present. The last main bug with the script is that I was unaware their /GetPlacementInfo method stored some info in a cache that was required for their /PlaceBet method, and so my script on a while loop exhausted my credit without making successful Arb bets, as I'd called /GetPlacementInfo a few times before calling /PlaceBet using the cache from only the last /GetPlacementInfo - meaning only one of my bets went though per arb pair/trio. On a while 1: loop, this used up all my credits.

In the last few hours or so, we can see many potential Arbs with large maximum bets (note there were more arb opportunities as the script wasn't running 100% of the time):

https://docs.google.com/spreadsheets/d/1PMYNXi7VZmiFD_ZN97e8TLVpr423rfbiCjejn58fePU/edit?usp=sharing

The betting strategy is easier given that they only give competing Back odds for different bets.

They'd let me know that one bookie they support isn't a fan of Arb, and so the script ignores them (SingBet) - and another Bookie isn't supported for BTC deposit (GA288). As a note, the Skrill (and other supported deposits) have lower min. deposits.

The threshold that it'll bet on is configurable by replacing some lines in the code. As you can see, there's plenty arb opportunity for at least the few people who showed interest on the Bitcointalk thread Smiley

I'm working on getting a referral code from AsianOdds88 as we speak, but wanted to see if I could drum up interest in testing this script with them to see if we can see net returns.

Let me know,
newbie
Activity: 62
Merit: 0
Sounds like a strategy that eventually should work, I guess. I'm also not a programmer nor do I have any knowledge about it. But as far as I read I could still use it right if I follow the right steps?
I would love to sign up as your referral and get into some bettinng
full member
Activity: 186
Merit: 100
Hi. I would like to try this out. I have an account at both though I predominantly use fairlay.

I'm curious though, as I'm not much of a programmer, but do you have a setting where I can just display all the arbitrage opportunities at a given time? And then choose which ones to bet manually?
member
Activity: 113
Merit: 10
@M0w thanks for taking the time (and risk) to evaluate my script and point me in the right direction. I understand better now.

I feel like a noob Smiley I didn't understand sports betting enough until @M0w enlightened me. With the proper math we see no current Arb opportunities - 2 false alarms with Haase v A Mannarino on one platform and Robin Haase vs. Roger Federer on the other, and the opposite w/ Haase v A Mannarino and Robin Haase vs. Roger Federer on the other. The best arb opportunity from this run of the script is 0.3% loss...

In order to become profitable, the script will have to be extended to 1) cover more sports 2) cover more exchanges / bookies.

Here are the exchanges / bookies I can find with APIs:

1. https://fairlay.com/api/
2. https://betbtc.zendesk.com/hc/en-us/sections/201042322-Betting-API-
3. https://www.pinnacle.com/en/api
4. http://betdaqtraders.com/what-web-methods-are-available/
5. http://smarkets.github.io/smk_api_docs/
6. https://developer.betfair.com/
7. https://developers.matchbook.com/

Afaik Fairlay uses Pinnacle odds, so they should be (for the most part) equal. The question then becomes 'who opposes arb?'

1. Fairlay supports arb
2. BetBTC supports arb
3. https://www.pinnacle.com/en/promotions/arbitrage-friendly
4. http://www.betdaqtips.com/what-is-arb-betting-betdaq-explains/
5. https://help.smarkets.com/hc/en-gb/articles/115002115965-What-is-Smarkets-
6. https://betting.betfair.com/what-is-arbing-arb-betting-explained.html
7. https://insights.matchbook.com/money-nothing-aribtrage-explained/

Are you guys aware of any other bookies / exchanges that support arb and have an API?

As a note on Betfair, I'm Canadian and can't access it:

'Why can I not access Betfair?

We are sorry to inform you that as of 14th January 2016, Betfair’s products are no longer be available to residents of Canada.

On 14th January 2016 Canadian residents are no longer be able to login to Betfair. Please note that all outstandingExchange & Sportsbook bets will remain in place, please contact us if you wish to gain details of these bets, or withdraw any winnings, by contacting our helpdesk here.'

I'll have funds available to bankroll efforts into testing arb scripts across these platforms a/o Sept...
legendary
Activity: 1400
Merit: 1009
I didn't knew betbtc and fairlay allowed arbitraging, it's nice to see you're providing script for free, but once high amount of arbitraging starts happening on their site they might consider changing the rules. so you might wanna keep low amount of script users!
also if their api is not reliable, you can use scrapy i think.
member
Activity: 113
Merit: 10
Hey everyone,

@M0w - great! I'll reply to your PM in a minute. The more hands the merrier Smiley

@M0w, @Yuuto - here's my list of other exchanges I found with market / betting APIs. From what I understand, Fairlay uses Pinnacle odds (although I could be corrected here if I'm wrong). As @M0w said, the benefit of working with Fairlay and BetBTC is that they don't care about arbers - meaning that we're not risking account limits or account closures, as I gather is the issue with arbing on most bookies / exchanges.

https://www.pinnacle.com/en/api
http://betdaqtraders.com/what-web-methods-are-available/
http://smarkets.github.io/smk_api_docs/
https://developer.betfair.com/
https://developers.matchbook.com/

I'm open to suggestion if anyone finds any other exchanges / bookies with available APIs where you can 1) find arb opportunities across 2-outcome and 3-outcome sports 2) act on them by creating / modifying existing orders.

I'm also interested in dev help should people have a better understanding than I about 3-outcome Sports betting (it's a bit of a stretch to understand how BetBTC and Fairlay's API related to Arb on Tennis alone).

Yes @Yuuto it's fully automated - set and forget! It also should work on any OS that supports Python as long as it'll install pip packages like requests and PyCrypto.
M0w
full member
Activity: 186
Merit: 100
I am also interested in testing this script. Especially since you are using two platforms that do not care about arbitrage bettors.

I have some small knowledge about Python (I'm a C++ programmer) and have a CentOS VPS ready to test your script on. Perhaps I could even help you extending this script in the future when you plan to add more bookmakers and other features.

Let me know if you need help testing, I've also sent you a PM.
hero member
Activity: 644
Merit: 501
OP, i am really interested in this bot.

I actually subscribe to bitedge which is basically the same thing - except they send you an email notification when there is an arbitrage opportunity. And a lot of the times i miss arbs because they come by when i'm sleeping or at work, which is a shame.

Since this is python based, it should run on any OS, correct?

And also this is fully automated once you set it up right? Are there only two betting exchanges available or more? Because if you have at least like 5 bookies then the chances of you getting a decent arb is increased exponentially.
Pages:
Jump to: