Comments (12)
Seems valid and a good fix. This one didn't crop up for me, as I guess I didn't have a self signed certificate in place. My only concern would be one of security. That risk is slight, but would it be better to write an if loop to deal with the error this throws? Although I suppose I could make this change now, as a quick fix, and deal with the error loop when I take on writing a wider set of error checking. Would appreciate your thoughts.
from abettor.
I'm by no means experienced in coding R or any other language. I was playing around with that login function all day and the only way I could get R to login was to disable the SSL check which is a good quick fix i suppose, but i agree about the concern for security. I tried adding:
cainfo = path.expand("~/client-2048.crt")
into the the RCURL POST but this would give me this first error again or an unmatched table error i cant reproduce. I know my certificates work because i was able to login to Betfair with them using cURL with Cygwin. I just think the RCurl error messages are generic and dont give enough insight into the problem. I think the error message is caused by the restriction of only being able to submit either a certificate or a key because Betfair wants both (according to the cURL requirements). Coming back to your thoughts about if loops, and think that would be a great idea to create a loop that would bypass the SSL certificate for people who are on delay and trying to just play around like im doing right now. And i appreciate the time you took to build this package, ive seen a lot of people wanting an R package for the new Betfair API-NG.
from abettor.
Before I make any changes, I was wondering if you were connecting through a proxy of some description? Just trying to figure out the circumstances where people are using a self signed certificate.
from abettor.
That completely slipped my mind, and yeah i am behind a proxy.
from abettor.
I think the way I am going to address this is to add another argument to the loginBF() function. By default ssl.verifypeer = TRUE, but people hitting the same error as this can manually set it to ssl.verifypeer = FALSE, from within their R code.
In this way, the default login always retains the best security through a verified SSL certificate, however people can still choose to manually change this to achieve login.
I didn't want a simple "if" loop, as it would mean some logins may default to non-verified SSL certificates, without the user being aware of it. And I didn't want to particularly add a stop to the loop, requiring user input acknowledgment, as this would make the automation process more difficult for those with self-signed certificates.
Hopefully the new argument option, with appropriate documentation, will work well.
from abettor.
Looking forward to the fix. I'll let you know if any more error pop up.
from abettor.
I've released a fix for this error. Please do re-install the package to test. loginBF() has a new argument - sslVerify. This defaults to TRUE, but may be explicitly changed to FALSE for self signed SSL certificates. If the fix tests successfully I'll close this issue.
from abettor.
Hi Phil,
I think the sslVerify argument needs to be added to each of the places where the PostForm() function is used, namely listEventTypes.R, listCountries.R, listMarketTypes.R, listCountries.R, listMarketBook.R, listMarketCatalogue.R and placeorders.R.
BTW the package looks as if it could be very useful, thanks for putting on github. I wondered how a cancelOrder function might look, do you have a design for it yet? If you'd like me to make a contribution in some way I'd be happy to try and help.
Regards,
Jason
from abettor.
Thanks Jason. Not the news I'd hoped, but at least the fix should be straight forward, if not elegant.
Haven't looked at cancelOrder yet and thanks for the offer of assistance. Please drop me an email directly. phill [at] starkingdom.co.uk as I'd like to hear more about your cancelOrder use cases.
from abettor.
Hey Phill does the 0.1.2 release fix all the scripts in the abettoR package or just the login? I've got the functions updated to work in R from your original package, so i'm in no rush. Just want to help confirm the package works when everything is fixed.
from abettor.
Apologies it's taken me so long to address this issue. However, now all functions support the sslVerify parameter (v0.1.3).
At this time, it was easiest and quickest to simply add the sslVerify parameter to all functions, rather than implement a global sslVerify function. The current solution has been tested with all functions and appears to work, but is a little inelegant. You will need to set sslVerify = FALSE as a parameter for all abettor functions, if the SSL verification is failing.
If either mrbub or JJHeathview can confirm this solution fixes the problem, I'll close out the issue.
from abettor.
Assuming fixed, so closing.
from abettor.
Related Issues (20)
- Additional Accounts API Calls HOT 4
- Regenerate Package Documentation HOT 1
- Support Spanish, Italian and Swedish end points HOT 1
- listRunnerBook Fails to Generate Documentation HOT 1
- placeOrders function does not include all fields HOT 10
- Rename checkBalance and listMarketPandL Functions HOT 2
- placeOrders not working correctly for some optional fields HOT 2
- getAccountStatement uses legacyData fields and code is messy HOT 1
- listCurrentOrders does not include all parameters HOT 1
- listClearedOrders is not correctly putting results into a dataframe and is instead providing one very long row. HOT 2
- Minor API change to listCurrentOrders - week commencing 9 August HOT 1
- Check valid login status HOT 5
- placeOrder function seems to not pass customerOrderRef on MARKET_ON_CLOSE bets HOT 1
- Help pulling market prices HOT 1
- Minor issue when trying to cancel individual betIds. Simple code fix has been proposed. HOT 3
- getAccountStatement crash with dead heat HOT 4
- getAccountStatement not returning all columns
- listMarketBook function returning identical results HOT 8
- The placeOrders function doesn't pass the handicap field to the API HOT 1
- date range in getAccountStatement not working correctly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from abettor.