harveysburger / pinnaclewrapper

A C# Wrapper for the PinnacleSports API
25 stars 56 forks source link

Need help Please. When i call PlaceBet method keep getting 500 (Internal Server Error). #6

Closed NickBixy closed 6 years ago

NickBixy commented 6 years ago

I must be doing something wrong. Every things works except for that i find sportid,leagueid and eventId ,get the lineid no problem. i made sure the game was open for betting and goinglive what ive been doing example

var bet = new PlaceBetRequest { UniqueRequestId = Guid.NewGuid(), AcceptBetterLine = true, OddsFormat = OddsFormat.AMERICAN, Stake = 10m, WinRiskType = WinRiskType.Risk, SportId = 3, EventId = 752169413, PeriodNumber = 0, BetType = BetType.MoneyLine, TeamType = TeamType.Team2, LineId = 414315283, Pitcher1MustStart = true, Pitcher2MustStart = true };

        var betting = client.PlaceBet(bet);
        var results = betting.Result.Status;
        Console.WriteLine(results);

Unhandled Exception: System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 500 (Internal Server Error). at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode() at PinnacleBetBot.PinnacleClient.d__32`1.MoveNext()