GithubHelp home page GithubHelp logo

bitstamp's People

Contributors

5an1ty avatar americas avatar anders94 avatar askmike avatar dynasource avatar fvilers avatar levino avatar maxblaushild avatar schopenhauer avatar vaunus avatar yogiben avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bitstamp's Issues

No orderBook method

I could not find a method for getting the orderBook list in your module?

Update: my mistake...

Net.js connect ETIMEDOUT

There seems to be an uncaught exception that get's thrown when a request times out.

connect ETIMEDOUT

nonce question

Hi,

Perhaps this is something I don't know about javascript. If you initialize nonce in the constructor as Date.now(), then generateNonce function returns nonce++. Wouldn't that always be unique as long as you use the same object?

doen't run in last node version

My code

`var Bitstamp = require('bitstamp');
var bitstamp = new Bitstamp();

bitstamp.transactions('btcusd', function(err, trades) {
console.error(err);
console.log(trades);
});`

node -v
v12.6.0

node --http-parser=legacy index.js

it's a work around for run

but if i call

node index.js

i got this error:

Error: Parse Error
at TLSSocket.socketOnData (_http_client.js:452:22)
at TLSSocket.emit (events.js:203:13)
at addChunk (_stream_readable.js:294:12)
at readableAddChunk (_stream_readable.js:275:11)
at TLSSocket.Readable.push (_stream_readable.js:210:10)
at TLSWrap.onStreamRead (internal/stream_base_commons.js:166:17) {
bytesParsed: 368,
code: 'HPE_INVALID_HEADER_TOKEN',
reason: 'Invalid header value char'
}

How to use buy_limit without limit price

Hello, I see in the following code:

Bitstamp.prototype.buy = function(market, amount, price, limit_price, callback) {
  this._post(market, 'buy', callback, {
    amount: amount,
    price: price,
    limit_price: limit_price
  });
}

that the buy (and sell) API calls have a limit_price field, which is optional. I'm a little noob on js, but how can I do a buy order without putting the "limit_price" arg?
Can I just do "privateBitstamp.buy('btcusd', amount, price, console.log);"? Will the limit_price not be used in that case?

Upgrading with new withdrawals methods

Hi Mike,

I would like to prepare a pull request to add withdrawal requests (like eth) but I don't know how to locally update my package. I use your package as a base then

  • in node_modules I update the code by adding functions (like eth_withdrawal)
  • cd /node_modules
  • run "npm install"
  • test my code (I deploy on Firebase Functions)

And the issue I have is that the new functions (like eth_withdrawal) are not recognized ("eth_withdrawal is not a function")

Do you have an idea?

Sorry for tagging this as an issue I don't know how to open a simple question on your repo :(

New XRP markets

Hi, sorry for all the questions using the "issues" on github, but there is no contact mail.

Is the library supporting straightforward the new markets with XRP? Is also the bitstamp-ws supporting these new markets and the EUR-USD market?

PS: sent you a tip in BTC for the nice work ;)

buy/sell

on: buy/sell function calls i get bitstamp error 404 ?
ist this node absolete?

help on withdrawl of XRP?

hi,
i just discovered your bitstamp node
and im looking in documentation for withdrawing BTC and XRP
now for XRP in dont get this from documentation:
privateBitstamp.ripple_withdrawal(amount, address, currency);
now my questions:

  1. XRP needs also a destination tag !? where can i add it?
  2. what is currency ?
    Thank you!

nonce error!?

hi,
when i call
privateBitstamp.buy
i get error invalid nonce?
any idea?
BUT
if i call
privateBitstamp.balanc
i get the balance

my bad... generated new keys... now works perfectly!

Invalid nonce error

Sometimes an API call will return without an err obj but the result will contain:

{error: "Invalid nonce"}

Error handling

When doing a call to a nonexisting endpoint, this one caoncats the error code and buffer. which means I am getting the entire html page in return.

      if (res.statusCode !== 200) {
        return callback(new Error('Bitstamp error ' + res.statusCode + ': ' + buffer));
      }

Is it possible get the return as two different entities, preferably as an object with statusCode and a short descriptive text like this for the most common error codes?

{ statusCode: 404, statusText: 'Not found' }

At least separate the statusCode from the buffer.

Sometimes when Bitstamp closes the connection abrupt the error throws

While it should be passed to the callback. Todo: replicate & handle correctly.

events.js:72
    throw er; // Unhandled 'error' event
          ^
Error: socket hang up
at SecurePair.error (tls.js:999:23)
at EncryptedStream.CryptoStream._done (tls.js:695:22)
at CleartextStream.read [as _read] (tls.js:496:24)
at CleartextStream.Readable.read (_stream_readable.js:320:10)
at EncryptedStream.onCryptoStreamFinish (tls.js:301:47)
at EncryptedStream.g (events.js:175:14)
at EncryptedStream.EventEmitter.emit (events.js:117:20)
at finishMaybe (_stream_writable.js:354:12)
at endWritable (_stream_writable.js:361:3)
at EncryptedStream.Writable.end (_stream_writable.js:339:5)
at EncryptedStream.CryptoStream.end (tls.js:633:31)
at Socket.onend (_stream_readable.js:483:10)

EDIT: error was on windows, might be platform specific.

When rate limited the message is not passed to the API user

When too many calls are made to the private API, Bitstamp will temporarily block the requests and inform us of it.

In Bitstamp.prototype._request:

the res.StatusCode is 200, however the buffer cannot be parsed as JSON. This results in messages like "SyntaxError: Unexpected token . in JSON at position 6" being passed as the error to the API callback.

Instead can we either return a BitstampError with the raw buffer text or include the raw buffer text in some other way.

The order option "daily_order" is missing from limit orders

@askmike
It is the same issue with both buy and sell
In some situations "daily_order" is a better option if an order in the opposite direction is not desireable, IMO

Bitstamp.prototype.sell = function(market, amount, price, limit_price, callback) {
  this._post(market, 'sell', callback, {
    amount: amount,
    price: price,
    limit_price: limit_price
  });
}

example.js

client_id needs to be a string, so client_id = 0 is quite misleading.

It'll help if it's '0' or '12345'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.