question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Deribit] Error with sandbox mode

See original GitHub issue
  • OS: Mac Catalina 10.15.4
  • Programming Language version: Javascript

From what I can see when I try to set sandbox mode and hit the testnet it seems to still be going to the production environment?

  const deribit = new ccxt.deribit({
    apiKey,
    secret
  });

  deribit.setSandboxMode();

  const a = await deribit.createOrder('BTC-PERPETUAL', 'market', 'sell', 2.5);

  console.log(a);

Keys are defined in the file as well. If I

AuthenticationError: deribit {"jsonrpc":"2.0","error":{"message":"invalid_credentials","code":13004},"testnet":false,"usIn":1588932635973078,"usOut":1588932635973095,"usDiff":17}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
tongnkcommented, May 8, 2020

Oh derp. Yep works perfectly

0reactions
kroitorcommented, May 8, 2020

@tongnk the correct way to set the sandbox mode is to provide an argument that controls whether you want to enable or disable it, like shown below:

const deribit = new ccxt.deribit({
    apiKey,
    secret,
    enableRateLimit: true,
    // verbose: true,
});

deribit.setSandboxMode(true); // ←--------------------- true = enable, false = disable

const a = await deribit.createOrder('BTC-PERPETUAL', 'market', 'sell', 2.5);

console.log(a);

Let me know if that answers your question or not.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Deribit API
Deribit provides three different interfaces to access the API: JSON-RPC over Websocket ... code, integer, A number that indicates the kind of error....
Read more >
Exchanges — ccxt 2.4.71 documentation
CCXT unifies that aspect and allows the user to switch to the exchange's sandbox (if supported by the underlying exchange). To switch to...
Read more >
cryptofeed - PyPI
Bugfix: Raise error if client tries to subscribe to KuCoin book data without an API key. Feature: Add ByBit sandbox endpoints.
Read more >
Market Data - Starter Guide – CoinAPI.io Reference
DERIBIT Exchange Ids, Website, Description ... Sandbox, No, http://rest-sandbox.coinapi.io/ ... Error message is returned in JSON structured like this:.
Read more >
API Docs - CryptoQuant
Name Token Contract Created Datetime (Block, Datetime) Chainlink link 4281611, 2017‑09‑16 21:26:29 Uniswap uni 10861674, 2020‑09‑14 18:11:26 Sushiswap sushi 10736094, 2020‑08‑26 12:28:07
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found