<p>Check the Bittrex <a href="https://bittrex.com/home/api" rel="nofollow noreferrer">api page</a>.</p>

<p>The <em>buyLimit</em> endpoint says that the <em>rate</em> must be <strong>the rate at which to place the order</strong>.</p>

<p>In order to get the current ask price, use the <em>getticker</em> api which will return something like:</p>

<pre><code>{
    "success" : true,
    "message" : "",
    "result" : {
        "Bid" : 2.05670368,
        "Ask" : 3.35579531,
        "Last" : 3.35579531
    }
}
</code></pre>

CC BY-SA 3.0
2017-07-20T08:32:45.483Z
From my tests, I believe there is a delay between the ticker API and the price displayed on the website interface. Did you experienced it ?
jbaptiste
CC BY-SA 3.0
2017-12-13T23:45:18.820Z
@jbaptiste you can use websockets nowadays !
Pepijn Olivier
CC BY-SA 3.0
2017-07-13T20:31:37.510Z
2017-07-13T20:31:37.510Z
Mike
<p>I am trying to write a bot to use it on Bittrex with nodeJs, but the documentation is very poor. My problem is that I would like to be able to buy the last ask, like when in the web you click in bid the option ask, this way the buy is instant.
For developing the bot I am using:
 <a href="https://github.com/n0mad01/node.bittrex.api" rel="nofollow noreferrer">https://github.com/n0mad01/node.bittrex.api</a>
I have tried:</p>

<pre><code> bittrex.buyLimit({ market: 'BTC-ETH', quantity: 0.001, rate: "ask"}, function (data) {
    console.log("Response: " +data);
})
</code></pre>

<p>but it does not accept the rate "ask", is there any way this can be done? </p>

<bots><bittrex>
Bittrex Bot buy at ask
Thirsty
# Bittrex Bot buy at ask

(Asked by: username_0 on 2017-07-13)

I am trying to write a bot to use it on Bittrex with nodeJs, but the documentation is very poor. My problem is that I would like to be able to buy the last ask, like when in the web you click in bid the option ask, this way the buy is instant.
For developing the bot I am using:
<https://github.com/n0mad01/node.bittrex.api>
I have tried:

```
 bittrex.buyLimit({ market: 'BTC-ETH', quantity: 0.001, rate: "ask"}, function (data) {
    console.log("Response: " +data);
})

```

but it does not accept the rate "ask", is there any way this can be done?

**Tags:** bots, bittrex


---

## 1 answers

### Answer by username_1 on 2017-07-13. Score: 1 | Accepted answer

Check the Bittrex [api page](https://bittrex.com/home/api).

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
    }
}

```

> **Comments:**
> **username_2**: From my tests, I believe there is a delay between the ticker API and the price displayed on the website interface. Did you experienced it ?  
> **username_3**: @username_2 you can use websockets nowadays !  

---

