Bittrex Bot buy at ask
Check the Bittrex api page.

The buyLimit endpoint says that the rate must be the rate at which to place the order.

In order to get the current ask price, use the getticker api which will return something like:

{
    "success" : true,
    "message" : "",
    "result" : {
        "Bid" : 2.05670368,
        "Ask" : 3.35579531,
        "Last" : 3.35579531
    }
}