8000 fix(hyperliquid): sanitize baseName by carlosmiei · Pull Request #26332 · ccxt/ccxt · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix(hyperliquid): sanitize baseName #26332

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

Merged
merged 1 commit into from
Jul 2, 2025

Conversation

carlosmiei
Copy link
Collaborator

No description provided.

@carlosmiei carlosmiei self-assigned this Jul 2, 2025
@carlosmiei carlosmiei merged commit 9e06e73 into ccxt:master Jul 2, 2025
9 of 11 checks passed
bsoares pushed a commit to foxbit-group/ccxt that referenced this pull request Jul 8, 2025
* [Automated changes] Python files

* [Automated changes] C# files

* [Automated changes] GO files

* [Automated changes] 4.4.90

* Reverts the messageQueue (ccxt#26248)

* Revert "Create message queue for unresolved messages in WS client (ccxt#22768)"

This reverts commit 560079a.

* update manual

* restore Client.php

* restore client.cs

* Update Client.cs

* chore(gate): retest props (ccxt#26247)

* chore(fmfwio): prop test (ccxt#26246)

* chore(fmfwio): prop test

* major curr

* chore(paradex): skip ticker (ccxt#26232)

* chore(paradex): skip ticker

* dummy change trigger

* ob skip

* fix!(coinlist): delist (ccxt#26137)

* chore(cryptocom): unskip tests (ccxt#26227)

* chore(cryptocom): unskip tests

* chore(cryptomus): unskip tests

* -
Revert "chore(cryptomus): unskip tests"

This reverts commit c66f834.

* [Automated changes] JS files

* [Automated changes] JS files

* [Automated changes] Python files

* [Automated changes] PHP files

* [Automated changes] C# files

* [Automated changes] GO files

* [Automated changes] Python files

* chore(modetrade): skip test redo (ccxt#26226)

* chore(modetrade): skip test redo

* test(currences): amount prop

* place change

* skip add

* [Automated changes] JS files

* [Automated changes] Python files

* [Automated changes] C# files

* [Automated changes] PHP files

* [Automated changes] GO files

* ignore error cs

* cli: remove --history (ccxt#26253)

* Restore fast client behaviour in python websockets (ccxt#26254)

* fastclient-edits

* restore the behaviour of the fast client removed in <
8000
a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3071987147" data-permission-text="Title is private" data-url="https://github.com/ccxt/ccxt/issues/25995" data-hovercard-type="pull_request" data-hovercard-url="/ccxt/ccxt/pull/25995/hovercard" href="https://github.com/ccxt/ccxt/pull/25995">ccxt#25995

* remove some comments

* remove unused var

* remove print statement

* build

* build

* remove unused var and typo

* cex.has leverage methods (ccxt#26251)

* chore(cryptomus): unskip tests (ccxt#26228)

* fix(exmo): fetchMarkets fixes (ccxt#26243)

* [Automated changes] JS files

* [Automated changes] JS files

* [Automated changes] Python files

* [Automated changes] Python files

* [Automated changes] PHP files

* [Automated changes] C# files

* [Automated changes] C# files

* [Automated changes] PHP files

* [Automated changes] GO files

* [Automated changes] GO files

* [Automated changes] PHP files

* remove outdated files

* [Automated changes] JS files

* [Automated changes] Python files

* [Automated changes] C# files

* [Automated changes] GO files

* fix(c#): disable most warnings and upgrade dotnet (ccxt#26262)

* fix(c#): disable most warnings

* upgrade dotnet version

* fix(mexc): watchOrders remove omit (ccxt#26269)

* feat(kraken): update watchMultiHelper methods to v2 (ccxt#26057)

* feat(kraken): watchTicker, watchTickers update to v2

* feat(kraken): watchBidsAsks update to v2

* feat(kraken): watchTrades, watchTradesForSymbols

* kraken watchOrderBook unfinished commit

* updated handleOrderBook and included some todo tasks

* fix customHandleDeltas

* fix checksum reading values from orderbook using safeValue

* fix

* handleOrderBook default checksum to false

* remove unused subscription param from parsers

* adjust formatNumber to use one loop

* use safeString for eventTrigger conditional

---------

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

* fix(kraken): update ping/pong & authentication (ccxt#26266)

* fix(kraken): update ping/pong & authentication

* kraken: update

* CR fixes

---------

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

* test(fetchTrades): sorted test (ccxt#26268)

* chore(bitmex): remove unskip & dummy change trigger retest (ccxt#26265)

chore(bitmex): remove unskip & trigger dummy change

* [Automated changes] JS files

* [Automated changes] Python files

* [Automated changes] PHP files

* [Automated changes] Python files

* [Automated changes] PHP files

* [Automated changes] GO files

* [Automated changes] PHP files

* test(tickers): fix tolerance for quotevol/basevol comparison (ccxt#26260)

* fix(ts): broken imports (ccxt#26273)

* chore(cryptomus): skip 2 ^ (ccxt#26261)

chore(cryptomus): skip 2

* [Automated changes] JS files

* [Automated changes] JS files

* [Automated changes] Python files

* [Automated changes] PHP files

* [Automated changes] GO files

* [Automated changes] GO files

* test(ticker): fix check for negative values, & bitmex (ccxt#26270)

test(ticker): fix check for negative values
chore(bitmex): unskip tests

* [Automated changes] JS files

* [Automated changes] Python files

* [Automated changes] PHP files

* [Automated changes] GO files

* fix(bitstamp): userId string (ccxt#26284)

* fix(php): in_array strict (ccxt#26283)

* fix(php): is_associative fix (ccxt#26277)

* fix(php): is_associative fix

* fix(php): deep_extend optimize

* comment

* [Automated changes] JS files

* [Automated changes] JS files

* [Automated changes] Python files

* [Automated changes] PHP files

* fix(exchange): protect cleanCache and add base unWatchOrders (ccxt#26280)

* fix(exchange): protect cleanCache

* fix php build

* Revert "fix php build"

This reverts commit 16ef27c.

* fix php build

* [Automated changes] GO files

* fix(cryptocom): add skipFetchCurrencies and protect call (ccxt#26285)

* fix(cryptocom): add skipFetchCurrencies and protect call

* improve logic

* disable fetchCurrencie test

* [Automated changes] JS files

* [Automated changes] Python files

* [Automated changes] PHP files

* [Automated changes] GO files

* fix: c# tests build (ccxt#26287)

* fix: binance dummy change

* change tests target framework

* [Automated changes] JS files

* [Automated changes] Python files

* [Automated changes] PHP files

* [Automated changes] GO files

* [Automated changes] C# files

* Ccxtpro error handling (ccxt#26278)

* revert conflicts

* python websocket errors

* php edits

* pass tests

* disjoin functions

* minor edit

* build

* [Automated changes] JS files

* [Automated changes] PHP files

* [Automated changes] GO files

* fix(bybit): ws spot orders parsing (ccxt#26291)

fix(binance): ws spot orders parsing

* [Automated changes] JS files

* [Automated changes] Python files

* hyperliquid: add type3 stop order (ccxt#26288)

* hyperliquid: add type3 stop order

* hyperliquid: update

* hyperliquid: update

* hyperliquid: update test

* add has

* fix features

* features again...

* features

---------

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

* [Automated changes] PHP files

* [Automated changes] JS files

* [Automated changes] Python files

* [Automated changes] PHP files

* [Automated changes] GO files

* [Automated changes] C# files

* fix: release.yml dotnet version (ccxt#26293)

* mexc XBT mapping (ccxt#26292)

conflict with BTC cause they have also XBT https://www.mexc.com/exchange/XBT_USDT

* [Automated changes] JS files

* [Automated changes] Python files

* [Automated changes] PHP files

* [Automated changes] C# files

* [Automated changes] GO files

* Merge clients (ccxt#26294)

* merge aiohttp client and client.py into the same file

* edit reference

* edit

* [Automated changes] 4.4.91

* Make Markets Mutex public (ccxt#26297)

* amend marketsMutex to be public and make it shared

* move markets initialization to Init function

---------

Co-authored-by: Um11aut <pavel.manokhin228@gmail.com>

* feat(lbank): fetchCurrencies (ccxt#26044)

* lbank-v1

* feat(lbank): fetchCurrencies implemented

* lbank - static tests all

* jsdoc

* static XBT fixes

* fix xbt

* fix(lbank): fetchCurrencies reorg

* currencies

* string

* skip ob compare item

* networkIdToCode implemented

* transaction

* trx

* lbank fix networks

* bsc

* [Automated changes] JS files

* [Automated changes] Python files

* [Automated changes] Python files

* [Automated changes] PHP files

* [Automated changes] C# files

* fix(exmo): fetchCurrencies multi req (ccxt#26244)

* fix(exmo): fetchCurrencies multi req

* fix currencies

* info

* active currencies

* Update skip-tests.json

* [Automated changes] JS files

* [Automated changes] Python files

* [Automated changes] PHP files

* [Automated changes] C# files

* chore: add single-js-build script (ccxt#26304)

* fix(lbank): fc endpoint (ccxt#26303)

* fix(lbank): fc endpoint

* disable

* Go lock fix (ccxt#26310)

* fix(go): lock initialization

* dummy change

* [Automated changes] JS files

* [Automated changes] Python files

* [Automated changes] PHP files

* [Automated changes] C# files

* [Automated changes] GO files

* fix(goTranspiler): rename old variables (ccxt#26306)

* fix(goTranspiler): rename old variables

* fix errors

* fix(bybit): unwatchOrders and unwatchMyTrades (ccxt#26313)

* [Automated changes] JS files

* [Automated changes] Python files

* [Automated changes] PHP files

* [Automated changes] C# files

* fix(client): reject error (ccxt#26314)

* [Automated changes] GO files

* fix(go): Yymmdd infix (ccxt#26316)

* fix(python): websocket rejections (ccxt#26319)

* fix(python): websocket rejections

* restore Future class

* remove extra clause

---------

Co-authored-by: Carlo Revelli <carlo.revelli@berkeley.edu>

* docs(bitmart): add stpMode (ccxt#26318)

* [Automated changes] JS files

* [Automated changes] Python files

* [Automated changes] PHP files

* [Automated changes] C# files

* [Automated changes] GO files

* fix(bitvavo): throw if operatorId not found (ccxt#26321)

* fix(bitvavo): static tests (ccxt#26323)

* fix(types): add session to constructor args (ccxt#26322)

* feat: make Options and Currencies thread-safe in go [wip] (ccxt#26308)

* feat: make Options and Currencies thread-safe in go

* adapt to safe map

* fix test

* fix linting

* fix php

* fix build

* fix toArray

* protect against null

* fix response tests

* indexBy support sync.Map

* fix indexBy

* [Automated changes] JS files

* [Automated changes] Python files

* [Automated changes] PHP files

* [Automated changes] GO files

* fix(cs): build base/quote Currencies (ccxt#26325)

* [Automated changes] C# files

* [Automated changes] 4.4.92

* fix(exmo): fetchCurrencies reorg & networks implementation (ccxt#26011)

* fix(exmo): fetchCurrencies reorg & networks implementation

* exmo - fc minor

* exmo - static tests all

* Discard changes to ts/src/test/static/response/exmo.json

* Discard changes to ts/src/test/static/request/exmo.json

* exmo - limits

* exmo fix tranpsiler trcik

* exmo networks

* Update exmo.ts

* fix(cryptomus): fetchCurrencies reorg 2 (ccxt#26258)

* fix(cryptomus): fetchCurrencies reorg 2

* eth arb

* fix(latoken): fetchCUrrencies reorg & tests (ccxt#26042)

* fix(latoken): fetchCUrrencies reorg

* safeList

* latoken - static tests all

* fix mkts

* [Automated changes] JS files

* [Automated changes] Python files

* [Automated changes] Python files

* [Automated changes] PHP files

* [Automated changes] C# files

* [Automated changes] GO files

* [Automated changes] C# files

* [Automated changes] GO files

* [Automated changes] PHP files

* fix(kucoin): fetchCurrencies reorg & struct (ccxt#26039)

* fix(kucoin): fetchCurrencies reorg & struct

* kucoin - static tests all

* limits skip - kucoin fc

* skip broken

* inarray

* kwd

* fiats add

* fiat add

* mkae it options adjustable

---------

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

* [Automated changes] JS files

* [Automated changes] Python files

* [Automated changes] PHP files

* [Automated changes] C# files

* [Automated changes] GO files

* fix(coinex): error code ^ (ccxt#26329)

fix(coinex): error code

* [Automated changes] JS files

* fix(ascendex): order parsing (ccxt#26328)

* fix(ascendex): order parsing

* ascendex - static tests

* static json

* [Automated changes] Python files

* [Automated changes] PHP files

* [Automated changes] C# files

* [Automated changes] GO files

* [Automated changes] JS files

* [Automated changes] Python files

* [Automated changes] PHP files

* [Automated changes] C# files

* fix(hyperliquid): sanitize baseName (ccxt#26332)

* [Automated changes] JS files

* [Automated changes] Python files

* [Automated changes] PHP files

* [Automated changes] GO files

* [Automated changes] C# files

* fix(bitstamp): ws orders parsing (ccxt#26331)

* fix(bitstamp): ws orders parsing

* fix ord stat

* [Automated changes] JS files

* [Automated changes] Python files

* [Automated changes] PHP files

* fix(bybit): unWatch orders/mytrades (ccxt#26326)

* [Automated changes] JS files

* [Automated changes] Python files

* [Automated changes] PHP files

* [Automated changes] C# files

* [Automated changes] GO files

* fix(lbank): ratelimit endpoint fix (ccxt#26337)

* [Automated changes] JS files

* [Automated changes] Python files

* [Automated changes] PHP files

* [Automated changes] C# files

* [Automated changes] GO files

* feat(binance, paradex): new fetchAllGreeks method (ccxt#26335)

* feat(binance): new fetchAllGreeks method

* remove getMarketFromSymbols usage

* feat(paradex): add fetchAllGreeks

```
paradex.fetchAllGreeks (["BTC/USD:USDC-130000-P","HYPE-USD-22-P"])
{
  'HYPE/USD:USDC-22-P': {
    symbol: 'HYPE/USD:USDC-22-P',
    timestamp: 1751592111857,
    datetime: '2025-07-04T01:21:51.857Z',
    delta: -0.004487704951046858,
    gamma: 0.0008490530142013742,
    theta: undefined,
    vega: 0.08533447933120764,
    rho: -0.009037122218698991,
    vanna: -0.011203040184363917,
    volga: 0.17542814742687196,
    bidSize: undefined,
    askSize: undefined,
    bidImpliedVolatility: 1.66955093,
    askImpliedVolatility: 1.74053324,
    markImpliedVolatility: 1.70980778,
    bidPrice: 0.024,
    askPrice: 0.03,
    markPrice: 0.02729462,
    lastPrice: 0.02,
    underlyingPrice: 40.35810912,
    info: {
      symbol: 'HYPE-USD-22-P',
      mark_price: '0.02729462',
      mark_iv: '1.70980778',
      delta: '-0.0044877',
      greeks: {
        delta: '-0.004487704951046858',
        gamma: '0.0008490530142013742',
        vega: '0.08533447933120764',
        rho: '-0.009037122218698991',
        vanna: '-0.011203040184363917',
        volga: '0.17542814742687196'
      },
      last_traded_price: '0.02',
      bid: '0.024',
      bid_iv: '1.66955093',
      ask: '0.03',
      ask_iv: '1.74053324',
      last_iv: '1.61539014',
      volume_24h: '35105.1326682',
      total_volume: '1300154.806894403698',
      created_at: '1751592111857',
      underlying_price: '40.35810912',
      open_interest: '2753',
      funding_rate: '0.0006763106445169713',
      price_change_rate_24h: '0.124123',
      future_funding_rate: '0.0001268'
    }
  },
  'BTC/USD:USDC-130000-P': {
    symbol: 'BTC/USD:USDC-130000-P',
    timestamp: 1751592111857,
    datetime: '2025-07-04T01:21:51.857Z',
    delta: -0.9783044081241248,
    gamma: 0.0000036836899133195874,
    theta: undefined,
    vega: 813.6960475339565,
    rho: -1695.2991174709546,
    vanna: 0.11218330047364478,
    volga: 3189.497377568867,
    bidSize: undefined,
    askSize: undefined,
    bidImpliedVolatility: 0.05,
    askImpliedVolatility: 0.88442522,
    markImpliedVolatility: 0.625751,
    bidPrice: 19988.1,
    askPrice: 20671,
    markPrice: 20354.22981544,
    lastPrice: 23803.8,
    underlyingPrice: 109620.57232647,
    info: {
      symbol: 'BTC-USD-130000-P',
      mark_price: '20354.22981544',
      mark_iv: '0.625751',
      delta: '-0.97830441',
      greeks: {
        delta: '-0.9783044081241248',
        gamma: '0.0000036836899133195874',
        vega: '813.6960475339565',
        rho: '-1695.2991174709546',
        vanna: '0.11218330047364478',
        volga: '3189.497377568867'
      },
      last_traded_price: '23803.8',
      bid: '19988.1',
      bid_iv: '0.05',
      ask: '20671',
      ask_iv: '0.88442522',
      last_iv: '2.01019906',
      volume_24h: '0',
      total_volume: '67457.37678577028',
      created_at: '1751592111857',
      underlying_price: '109620.57232647',
      open_interest: '0.004',
      funding_rate: '-0.00022986431794216831',
      price_change_rate_24h: '-0.027004',
      future_funding_rate: '0.0000752'
    }
  }
}
```

* cr fixes

---------

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

* fix(ws): network error on closed connection (ccxt#26339)

* fix(ws): network error on closed connection

* add test

* fix linting

* remove var

* enable sandbox mode

* remove verbose

* change log level location

---------

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

* [Automated changes] JS files

* [Automated changes] Python files

* [Automated changes] PHP files

* [Automated changes] JS files

* [Automated changes] C# files

* fix(go): add NewGreeksArray (ccxt#26341)

* fix(go): default nil for markets (ccxt#26342)

* fix(go): default nil for markets

* dummy changes

* fix transpiler

* fix defaultMarkets

* add method to interface

* [Automated changes] JS files

* [Automated changes] Python files

* [Automated changes] PHP files

* [Automated changes] C# files

* [Automated changes] GO files

* go cli MapToSafeMap fix (ccxt#26346)

* fix(coinex): add margin property (ccxt#26350)

* [Automated changes] JS files

* [Automated changes] Python files

* [Automated changes] PHP files

* [Automated changes] C# files

* [Automated changes] GO files

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Carlo Revelli <carlo.revelli@berkeley.edu>
Co-authored-by: T. Todua <7117978+ttodua@users.noreply.github.com>
Co-authored-by: Peter Lai <alk03073135@gmail.com>
Co-authored-by: Sam Germain <sam.germain@usask.ca>
Co-authored-by: carlosmiei <43336371+carlosmiei@users.noreply.github.com>
Co-authored-by: Dan <83686770+Dan-krm@users.noreply.github.com>
Co-authored-by: ndubel <38309641+ndubel@users.noreply.github.com>
Co-authored-by: Um11aut <144227643+Um11aut@users.noreply.github.com>
Co-authored-by: Um11aut <pavel.manokhin228@gmail.com>
Co-authored-by: Pablo Criado-Perez <pablo@criadoperez.com>
Co-authored-by: caoilainnl <caoilainn.lynch@proton.me>
Co-authored-by: profyverya <39007853+profyverya@users.noreply.github.com>
@kilianjanssen
Copy link

It seems like since this fix hyperliquid starts throwing 500 Internal Server Error on kilo (k) markets.
For example when using fetch_funding_rate_history() on KPEPE/USDC:USDC | Type: <class 'ccxt.base.errors.ExchangeNotAvailable'> | Exception: hyperliquid POST https://api.hyperliquid.xyz/info 500 Internal Server Error null

@carlosmiei
Copy link
Collaborator Author

@kilianjanssen thanks for your report, will check it now

@kilianjanssen
Copy link
kilianjanssen commented Jul 14, 2025

@carlosmiei thanks for the fix, however I noticed that the symbol for kBase pairs is now written as KBASE/QUOTE instead of kBASE/QUOTE. Is this what is supposed to happen? As in my code I check if the symbol name starts with a lowercase k to detect if it's a kilo market. And I can't check for a capital letter K because it can be any base that stars with a K.

@carlosmiei
Copy link
Collaborator Author

@kilianjanssen I understand your concern but to make things consistent we have to make every currency-id uppercase, can't you use a different heuristic to infer if the market is a 1000/k market? In this particular hyperliquid case instead of checking market['base'] you can check market['baseName'] or market['info]['name'] these fields will contain the raw exchange-specific id in this case kPEPE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0