frosty00

frosty00

Member Since 6 years ago

London

Experience Points
75
follower
Lessons Completed
19
follow
Lessons Completed
92
stars
Best Reply Awards
27
repos

1692 contributions in the last year

Pinned
⚡ A JavaScript / Python / PHP cryptocurrency trading API with support for more than 100 bitcoin/altcoin exchanges
⚡ Secret Sharing implementation using Lagrange interpolation in python
Activity
Oct
24
12 hours ago
Activity icon
created branch

frosty00 in frosty00/ccxt create branch binance-okex-network

createdAt 4 hours ago
pull request

frosty00 pull request ccxt/ccxt

frosty00
frosty00

waves testnet minor fix

Activity icon
created branch

frosty00 in frosty00/ccxt create branch waves-testnet

createdAt 4 hours ago
Oct
23
1 day ago
pull request

frosty00 pull request ccxt/ccxt

frosty00
frosty00

binance networks fix for eth

Activity icon
created branch

frosty00 in frosty00/ccxt create branch binance-networks-fix

createdAt 13 hours ago
push

frosty00 push frosty00/ccxt

frosty00
frosty00

commit sha: 2b6acb0c36b6b379208ddb7046460e5328564bc4

push time in 14 hours ago
pull request

frosty00 pull request ccxt/ccxt

frosty00
frosty00

waves exchange add support for networks

also change getAccessToken -> signIn

Activity icon
created branch

frosty00 in frosty00/ccxt create branch waves-networks

createdAt 17 hours ago
push

frosty00 push frosty00/ccxt

frosty00
frosty00

add SRM and MINA inspected from webui

commit sha: e4fe547832d3f0393cae9fd836d5b1a7e01e59fa

push time in 19 hours ago
Activity icon
issue

frosty00 issue comment ccxt/ccxt

frosty00
frosty00

kraken fetchDepositAddress send required param 'method'

frosty00
frosty00
[
  'ADA.S',   'ALGO.S',   'ATOM.S',
  'AUD',     'BTC.M',    'CAD',
  'CHF',     'DOT.S',    'ETH2',
  'ETH2.S',  'EUR',      'EUR.HOLD',
  'EUR.M',   'FLOW.S',   'FLOWH',
  'FLOWH.S', 'GBP',      'JPY',
  'KAVA.S',  'KSM.P',    'KSM.S',
  'MINA',    'SOL.S',    'SRM',
  'USD',     'USD.HOLD', 'USD.M',
  'XTZ.S'
]

these currencies are missing deposit addresses

pull request

frosty00 pull request ccxt/ccxt

frosty00
frosty00

kraken fetchDepositAddress send required param 'method'

Activity icon
created branch

frosty00 in frosty00/ccxt create branch kraken-fetch-deposit-address

createdAt 20 hours ago
pull request

frosty00 pull request ccxt/ccxt

frosty00
frosty00

delist exx

unknown host meaning the dns has expired

Activity icon
created branch

frosty00 in frosty00/ccxt create branch delist-exx

createdAt 1 day ago
pull request

frosty00 pull request ccxt/ccxt

frosty00
frosty00

parse leverage limits as an integer

Activity icon
issue

frosty00 issue comment ccxt/ccxt

frosty00
frosty00

Fetch funding rate symbol is optional, added parameter end

You don't actually need to provide a symbol to binance and ftx, but you do for gateio

I also added the end parameter to this method

frosty00
frosty00

i don't think we should support end as a unified param, see how we how only support since for most unified methods. if the user wants to query an end date they can pass it via the params argument

pull request

frosty00 pull request ccxt/ccxt

frosty00
frosty00

parse leverage limits as an integer

Activity icon
created branch

frosty00 in frosty00/ccxt create branch leverage-integer

createdAt 1 day ago
Oct
22
2 days ago
Activity icon
issue

frosty00 issue comment ccxt/ccxt

frosty00
frosty00

describe.limits.leverage added to bittrex, bybit, coinbase, kucoin, huobi, okex

Also added superLeverage to huobi I also removed describe.limits.leverage.min because

  • most exchanges don't give it
  • Those that do (bybit and gateio) give a value of 1 every single time
  • I thought it could lead to confusion because some margin markets give a max leverage value (e.g. 10) and then you decide your actual leverage based on how much collateral you decide to spend, but other exchanges, like most futures exchanges, multiply your collateral by the value that your leverage is set to

It looks like Phemex might have a leverage structure similar to binance (with leverage brackets) but they provide these brackets in the fetchMarkets response.

        info: {                   symbol:   "ATOMUSD",
                          displaySymbol:   "ATOM / USD",
                           ...
                            tipOrderQty:   "7500",
                                  steps:   "500K",
                             riskLimits: [ {               limit: "500000",          // This is the part that looks like leverage_brackets
                                                   initialMargin: "5.0%",
                                                 initialMarginEr: "5000000",
                                               maintenanceMargin: "1.0%",
                                             maintenanceMarginEr: "1000000"  },
                                           {               limit: "1000000",
                                                   initialMargin: "5.5%",
                                                 initialMarginEr: "5500000",
                                               maintenanceMargin: "1.5%",
                                             maintenanceMarginEr: "1500000"  },
                                           {               limit: "1500000",
                                                   initialMargin: "6.0%",
                                                 initialMarginEr: "6000000",
                                               maintenanceMargin: "2.0%",
                                             maintenanceMarginEr: "2000000"  },
                                           {               limit: "2000000",
                                                   initialMargin: "6.5%",
                                                 initialMarginEr: "6500000",
                                               maintenanceMargin: "2.5%",
                                             maintenanceMarginEr: "2500000"  },
                                           ...
                                           {               limit: "5000000",
                                                   initialMargin: "9.5%",
                                                 initialMarginEr: "9500000",
                                               maintenanceMargin: "5.5%",
                                             maintenanceMarginEr: "5500000"  }  ] },

I could create a unified response by adding binance and phemex's leverage brackets to limits:leverage but that would require another api call on binance futures to fapiPrivateGetLeverageBracket dapiPrivateV2GetLeverageBracket.

This might be a good idea because

  • it's looking like every other exchange provides this information when you fetch the markets
  • Anyone trading on futures would probably want this information and need to make both calls anyway (unless maybe they're always trading below 20x)
  • It should probably be handled in the same singleton type manner that the markets are handled, and refreshed accordingly when the markets are refreshed

Let me know what you think about this part

frosty00
frosty00

i think we should use safeInteger instead of safeNumber for leverage parsing

Activity icon
issue

frosty00 issue comment ccxt/ccxt

frosty00
frosty00

Gateio fetchMyTrades

The gateio contracts response looks like this, with the side described as enter or exit

time |        symbol |       order | type |  side | takerOrMaker |   price | amount |      cost
-----------------------------------------------------------------------------------------------
237Z | BTC/USDT:USDT | * |      | enter |        taker |   51347 |      4 |    205388
144Z | BTC/USDT:USDT | * |      | enter |        taker | 51339.2 |     15 |    770088
715Z | BTC/USDT:USDT | * |      |  exit |        taker | 54217.6 |     -6 | -325305.6
326Z | BTC/USDT:USDT | * |      |  exit |        taker | 61987.8 |    -13 | -805841.4
799Z | BTC/USDT:USDT | * |      | enter |        taker | 62666.1 |      1 |   62666.1
205Z | BTC/USDT:USDT | * |      |  exit |        taker | 62713.1 |     -1 |  -62713.1
340Z | BTC/USDT:USDT | * |      |  exit |        taker | 62713.1 |     -1 |  -62713.1
444Z | BTC/USDT:USDT | * |      | enter |        taker | 62702.7 |      1 |   62702.7

I did this because the response from the api doesn't return the side, but I also thought the use of negative numbers for size was confusing Does it mean I exited a trade or that I sold that amount?

[{
  size: "-13",
  order_id: "*",
  id: "*",
  role: "taker",
  create_time: "1634600263.326",
  contract: "BTC_USDT",
  price: "61987.8",
}]

I had to test it out by making some trades and checking the response, but it turns out that it means exiting the trade, So if you buy a short or sell a long and spend 13 on something, the size is listed as -13

Let me know if I should just remove the values for size in the response, but it helped clear things up in my opinion

frosty00
frosty00

I had to test it out by making some trades and checking the response, but it turns out that it means exiting the trade, So if you buy a short or sell a long and spend 13 on something, the size is listed as -13

You're saying if the trade reduces your position the side is negative? I would expect short orders to have negative size and long orders to have positive size, let me know if it isn't the case

Activity icon
issue

frosty00 issue comment ccxt/ccxt

frosty00
frosty00

Gateio fetchMyTrades

The gateio contracts response looks like this, with the side described as enter or exit

time |        symbol |       order | type |  side | takerOrMaker |   price | amount |      cost
-----------------------------------------------------------------------------------------------
237Z | BTC/USDT:USDT | * |      | enter |        taker |   51347 |      4 |    205388
144Z | BTC/USDT:USDT | * |      | enter |        taker | 51339.2 |     15 |    770088
715Z | BTC/USDT:USDT | * |      |  exit |        taker | 54217.6 |     -6 | -325305.6
326Z | BTC/USDT:USDT | * |      |  exit |        taker | 61987.8 |    -13 | -805841.4
799Z | BTC/USDT:USDT | * |      | enter |        taker | 62666.1 |      1 |   62666.1
205Z | BTC/USDT:USDT | * |      |  exit |        taker | 62713.1 |     -1 |  -62713.1
340Z | BTC/USDT:USDT | * |      |  exit |        taker | 62713.1 |     -1 |  -62713.1
444Z | BTC/USDT:USDT | * |      | enter |        taker | 62702.7 |      1 |   62702.7

I did this because the response from the api doesn't return the side, but I also thought the use of negative numbers for size was confusing Does it mean I exited a trade or that I sold that amount?

[{
  size: "-13",
  order_id: "*",
  id: "*",
  role: "taker",
  create_time: "1634600263.326",
  contract: "BTC_USDT",
  price: "61987.8",
}]

I had to test it out by making some trades and checking the response, but it turns out that it means exiting the trade, So if you buy a short or sell a long and spend 13 on something, the size is listed as -13

Let me know if I should just remove the values for size in the response, but it helped clear things up in my opinion

frosty00
frosty00

the amount in the trade should always be a positive number. in this case the information about the side of the trade, "buy" or "sell" is encoded in the sign on the size

Oct
21
3 days ago
push

frosty00 push frosty00/ccxt

frosty00
frosty00

move fallback handler after handleErrors

commit sha: ceae59c7cc8787ab6066657858c1ff3e38c8e1e8

push time in 2 days ago
pull request

frosty00 pull request ccxt/ccxt

frosty00
frosty00

add php error handling

we need to check if curl_errno is set to something other than 0 and throw.

this will help to reduce the number of errors such as this one that some users are reporting

php > count(null);
PHP Warning:  Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in php shell code:1
Stack trace:
#0 {main}
  thrown in php shell code on line 1

Warning: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in php shell code:1
Stack trace:
#0 {main}
  thrown in php shell code on line 1
Activity icon
created branch

frosty00 in frosty00/ccxt create branch php-better-error-handling

createdAt 3 days ago
Previous