Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(whitebit): fetchDepositsWithdrawals #22065

Merged

Conversation

samgermain
Copy link
Member

@samgermain samgermain commented Apr 6, 2024

Currently getting this error

% whitebit fetchDepositsWithdrawals
2024-04-23T23:42:44.216Z
Node.js: v18.12.0
CCXT v4.2.90
whitebit.fetchDepositsWithdrawals ()
PermissionDenied whitebit {"code":0,"message":"This action is unauthorized."}
---------------------------------------------------
[PermissionDenied] whitebit {"code":0,"message":"This action is unauthorized."}

    at throwExactlyMatchedException  …samgermain/Documents/CCXT/ccxt/ts/src/base/Exchange.ts:4520  
    at handleErrors                  Users/samgermain/Documents/CCXT/ccxt/ts/src/whitebit.ts:2408  
    at                               …samgermain/Documents/CCXT/ccxt/ts/src/base/Exchange.ts:1238  
    at processTicksAndRejections     node:internal/process/task_queues:95                          
    at fetch2                        …samgermain/Documents/CCXT/ccxt/ts/src/base/Exchange.ts:4054  
    at request                       …samgermain/Documents/CCXT/ccxt/ts/src/base/Exchange.ts:4058  
    at fetchDepositsWithdrawals      Users/samgermain/Documents/CCXT/ccxt/ts/src/whitebit.ts:2296  
    at async run                     Users/samgermain/Documents/CCXT/ccxt/examples/ts/cli.ts:335   

whitebit {"code":0,"message":"This action is unauthorized."}

@ttodua
Copy link
Member

ttodua commented Apr 26, 2024

I got response:

{
  id: undefined,
  txid: "0x255ad4095552c79....90d4e7feb778931",
  timestamp: 1619020028000,
  datetime: "2021-04-21T15:47:08.000Z",
  network: undefined,
  addressFrom: "0x6A....0f",
  address: "0x6A....0f",
  addressTo: undefined,
  amount: 36781915.84562198,
  type: "deposit",
  currency: "SFM",
  status: "ok",
  updated: undefined,
  tagFrom: undefined,
  tag: undefined,
  tagTo: undefined,
  comment: undefined,
  internal: undefined,
  fee: {
    cost: 0,
    currency: "SFM",
  },
  info: {
    address: "0x6A....0f",
    uniqueId: null,
    transactionId: "a6d71d69-2b17-4ad8-8b15-2d686c54a1a5",
    createdAt: "1619020028",
    currency: "SafeMoon V2",
    ticker: "SFM",
    method: "1",
    amount: "36781915.845621978",
    description: null,
    memo: null,
    fee: "0",
    status: "3",
    network: null,
    transactionHash: "0x255ad4095552c79....90d4e7feb778931",
    details: {
      partial: null,
    },
    centralized: false,
  },
}

and with --requestTests:

{
  "description": "Fill this with a description of the method call",
  "method": "fetchDepositsWithdrawals",
  "url": "https://whitebit.com/api/v4/main-account/history",
  "input": [
    "USDT"
  ],
  "output": "{\"request\":\"/api/v4/main-account/history\",\"nonce\":\"1714156110333\",\"ticker\":\"USDT\"}"
}

i think transactionId is not being parsed in this PR, you can amend it.

@samgermain samgermain marked this pull request as ready for review April 27, 2024 04:30
@samgermain samgermain closed this Apr 27, 2024
@samgermain samgermain reopened this Apr 27, 2024
@samgermain
Copy link
Member Author

Travis failed with ./build.sh: line 160: tsx: command not found

@carlosmiei carlosmiei self-assigned this Apr 29, 2024
@carlosmiei carlosmiei merged commit ccf44b1 into ccxt:master Apr 29, 2024
1 of 2 checks passed
kroitor pushed a commit that referenced this pull request Apr 29, 2024
* feat(whitebit): fetchDepositsWithdrawals

* parseTransaction - parse txId correctly

* whitebit fetchDepositsWithdrawals static tests

---------

Co-authored-by: carlosmiei <43336371+carlosmiei@users.noreply.github.com>

[ci skip]
@samgermain samgermain deleted the whitebit-fetch-deposits-withdrawals branch April 29, 2024 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants