Note that there are some explanatory texts on larger screens.

plurals
  1. PODoes anyone have c# code to use betfair api?
    primarykey
    data
    text
    <p>I am creating a c# windows app to display current sports market rates using betfair exchange webservice, I used the </p> <blockquote> <p>getmarketpricescompressed()</p> </blockquote> <p>method which returns a price string that looks like this:</p> <pre><code>106093239~GBP~ACTIVE~0~1~~true~5.0~1343114432333~~N:7337~1~6992.56~2.16~~~false~~~~|2.16~1036.19~L~1~2.14~97.18~L~2~2.12~5.0~L~3~|2.18~467.36~B~1~2.2~34.12~B~2~2.22~162.03~B~3~:414464~2~102181.96~1.86~~~false~~~~|1.85~2900.33~L~1~1.84~1831.59~L~2~1.83~1593.73~L~3~|1.86~58.83~B~1~1.87~1171.77~B~2~1.88~169.15~B~3~ </code></pre> <p>i don't know how to properly unpack this string, for now i am using this code:</p> <pre><code>GetMarketPricesCompressedReq price_req1 = new GetMarketPricesCompressedReq(); price_req1.header = header2; price_req1.marketId = marketid_temp; price_req1.currencyCode = "GBP"; GetMarketPricesCompressedResp price_resp = new GetMarketPricesCompressedResp(); price_resp = bfg2.getMarketPricesCompressed(price_req1); //MessageBox.Show(price_resp.errorCode.ToString()); //richTextBox1.Text = ""; //richTextBox1.Text = price_resp.marketPrices; string prices = price_resp.marketPrices; richTextBox1.Text = price_resp.marketPrices; string[] ab1 = prices.Split('|'); string[] temp = ab1[1].Split('~'); textBox3.Text = temp[0]; textBox4.Text = temp[4]; textBox5.Text = temp[8]; temp = ab1[2].Split('~'); textBox6.Text = temp[0]; textBox7.Text = temp[4]; textBox8.Text = temp[8]; temp = ab1[3].Split('~'); textBox9.Text = temp[0]; textBox10.Text = temp[4]; textBox11.Text = temp[8]; temp = ab1[4].Split('~'); textBox12.Text = temp[0]; textBox13.Text = temp[4]; textBox14.Text = temp[8]; if (ab1.Length &gt;5) { temp = ab1[5].Split('~'); textBox15.Text = temp[0]; textBox16.Text = temp[4]; textBox17.Text = temp[8]; temp = ab1[6].Split('~'); textBox18.Text = temp[0]; textBox19.Text = temp[4]; textBox20.Text = temp[8]; } </code></pre> <p>It works fine for a few matches, but i observed the string changes for a few other matches and it thus generates exceptions, Can any1 help me with a proper code to unpack this string, i've googled it and found a vb code, which was not very usefull,</p> <p>and btw, i want to arrange the data in something like this:</p> <p><img src="https://i.stack.imgur.com/quueF.jpg" alt="enter image description here"></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload