Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,9 @@ jobs:

lowest-deps:
# Verify the SDK still builds and tests pass against the LOWEST versions
# of every `require` constraint (guzzle ^7.5 → 7.5.0, etc.). The regular
# `build` job resolves highest-compatible and would silently start using
# a Guzzle 7.6+-only API without bumping the constraint, which would break
# users pinned to 7.5.
# of every `require` constraint (guzzle ^7.16.1 → 7.16.1, etc.). The regular
# `build` job resolves highest-compatible versions and would not catch use
# of APIs unavailable in the minimum supported dependency versions.
name: PHP 8.1 — prefer-lowest dep resolve + phpunit
runs-on: ubuntu-latest
steps:
Expand Down
101 changes: 101 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,105 @@
# Changelog

## 0.1.2 — 2026-10-28

### Fixed
- Allow public margin token conversion queries without credentials while retaining authenticated OTC data and live credential updates.

### Added
- `AlphaService::getLpOrderList(...)`
- `AlphaService::getLpPayTokenList(...)`
- `AlphaService::getLpPayTokenPrice(...)`
- `AlphaService::getLpPoolInfo(...)`
- `AlphaService::getLpPoolList(...)`
- `AlphaService::getLpPositionList(...)`
- `AlphaService::executeLpRedeem(...)`
- `AlphaService::executeLpStake(...)`
- `AlphaService::executePredictionBuy(...)`
- `AlphaService::getPredictionEngineStatus(...)`
- `AlphaService::getPredictionEventDetail(...)`
- `AlphaService::getPredictionOrderBook(...)`
- `AlphaService::getPredictionOrderEstimate(...)`
- `AlphaService::getPredictionOrderList(...)`
- `AlphaService::getPredictionPayTokenList(...)`
- `AlphaService::getPredictionPortfolioSummary(...)`
- `AlphaService::getPredictionPositionHistory(...)`
- `AlphaService::getPredictionPositionList(...)`
- `AlphaService::getPredictionPriceHistory(...)`
- `AlphaService::executePredictionSell(...)`
- `AlphaService::getPredictionSideMarketList(...)`
- `AlphaService::getPredictionGroupStageDetail(...)`
- `AlphaService::getPredictionMatchList(...)`
- `AlphaService::getPredictionTimelineStages(...)`
- `AlphaService::getPredictionTokenPrice(...)`
- `AlphaService::getAssetDetail(...)`
- `AlphaService::getAssetList(...)`
- `AlphaService::getBizTokenDetails(...)`
- `AlphaService::getBizTokenList(...)`
- `AlphaService::getBizTokenPriceList(...)`
- `AlphaService::getOrderList(...)`
- `AlphaService::getPayTokenList(...)`
- `AlphaService::executePurchase(...)`
- `AlphaService::getTradeQuote(...)`
- `AlphaService::executeRedeem(...)`
- `EventService::getEcOrderHistory(...)`
- `EventService::getEcActiveOrders(...)`
- `EventService::getEcPositionInfo(...)`
- `EventService::getEcSettlements(...)`
- `EventService::getEcTradeHistory(...)`
- `TaxService::batchCreateTaxReports(...)`
- `TaxService::batchQueryTaxReports(...)`
- `FiatService::queryBalance(...)`
- `FiatService::queryCoinList(...)`
- `FiatService::queryTradeHistory(...)`
- `FiatService::applyQuote(...)`
- `FiatService::getReferencePrice(...)`
- `FiatService::confirmQuote(...)`
- `FiatService::queryTrade(...)`
- `LendingService::insLoanAssociationUid(...)`
- `LendingService::insLoanCoinDeltaAmount(...)`
- `LendingService::insLoanDelayLiqStatus(...)`
- `LendingService::insLoanEnsureTokensConvert(...)`
- `LendingService::insLoanGetLoanOrder(...)`
- `LendingService::insLoanLtvConvert(...)`
- `LendingService::insLoanProductInfos(...)`
- `LendingService::insLoanRepaidHistory(...)`
- `LendingService::insLoanRepayLoan(...)`
- `PreUpgradeService::getTransactionLog(...)`
- `PreUpgradeService::getDeliveryRecord(...)`
- `PreUpgradeService::getSettlementRecord(...)`
- `PreUpgradeService::getExecutionList(...)`
- `PreUpgradeService::getOrderHistory(...)`
- `PreUpgradeService::getClosedPnl(...)`
- `ReferralService::getCampaignRewards(...)`
- `ReferralService::getCommissionRecords(...)`
- `ReferralService::getUserIdentityProfile(...)`
- `ReferralService::getUserInvitations(...)`
- `SpotMarginService::queryFixedBorrowPenaltyInterest(...)`
- `SpotMarginService::cancelFixedBorrowOrder(...)`
- `SpotXService::getLaunchpoolProjectList(...)`
- `SpotXService::getLaunchpoolUserActivityLog(...)`
- `SpotXService::getLaunchpoolUserCurrentStaking(...)`
- `SpotXService::getLaunchpoolUserHistory(...)`
- `SpotXService::getPuzzleProjectList(...)`
- `SpotXService::getTokenSplashProjectList(...)`
- `SpotXService::getTokenSplashUserActivityParams(...)`
- `SpreadTradeService::getHistory(...)`
- `SpreadTradeService::getSpreadInstrumentsInfo(...)`
- `SpreadTradeService::getSpreadMaxQty(...)`
- `SpreadTradeService::amendSpreadOrder(...)`
- `SpreadTradeService::cancelSpreadOrder(...)`
- `SpreadTradeService::cancelAllSpreadOrders(...)`
- `SpreadTradeService::createSpreadOrder(...)`
- `SpreadTradeService::getSpreadOrderHistory(...)`
- `SpreadTradeService::getSpreadOpenOrders(...)`
- `SpreadTradeService::getSpreadOrderbook(...)`
- `SpreadTradeService::getSpreadRecentTrades(...)`
- `SpreadTradeService::getSpreadTickers(...)`
- `StrategyService::createStrategy(...)`
- `StrategyService::queryList(...)`
- `StrategyService::queryOrderList(...)`
- `StrategyService::stopStrategy(...)`

## 0.1.1 — 2026-10-09

### Added
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,22 @@ Each API group is a readonly property on `Bybit\Client`:
- `$client->asset` — coin balance, funding history
- `$client->user` — sub-accounts, API-key management
- `$client->affiliate` — sub-affiliate lists
- `$client->alpha` — Alpha trading, prediction markets, liquidity pools
- `$client->broker` — broker earnings, distributions
- `$client->cryptoLoan` — flexible / fixed crypto loans
- `$client->event` — event-contract orders, positions, trades, settlements
- `$client->fiat` — fiat balances, quotes, and trade history
- `$client->lending` — institutional loans
- `$client->rfq` — request-for-quote (block trades)
- `$client->spotMargin` — UTA spot margin
- `$client->spotX` — Launchpool, Puzzle, and Token Splash activities
- `$client->spreadTrade` — spread instruments and orders
- `$client->strategy` — algorithmic trading strategies
- `$client->tax` — batch tax reports
- `$client->earn` — earn, liquidity mining, RWA, PWM, hold-to-earn
- `$client->p2p` — P2P advertise / order / chat
- `$client->preUpgrade` — pre-upgrade account, order, execution, and position history
- `$client->referral` — referral campaigns, commissions, and invitations
- `$client->bot` — DCA / grid / futures-combo / futures-grid / martingale

## Error Handling
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"require": {
"php": ">=8.1",
"ext-json": "*",
"guzzlehttp/guzzle": "^7.5"
"guzzlehttp/guzzle": "^7.16.1"
},
"require-dev": {
"phpunit/phpunit": "^10.5",
Expand Down
5 changes: 0 additions & 5 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,4 @@
<directory>src</directory>
</include>
</source>
<coverage>
<report>
<text outputFile="php://stdout" showUncoveredFiles="true"/>
</report>
</coverage>
</phpunit>
2 changes: 1 addition & 1 deletion src/Bybit.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/
final class Bybit
{
public const VERSION = '0.1.1';
public const VERSION = '0.1.2';

public const BASE_URL_MAINNET = 'https://api.bybit.com';
public const BASE_URL_TESTNET = 'https://api-testnet.bybit.com';
Expand Down
30 changes: 30 additions & 0 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,26 @@
// gen-sdk-php:service-uses:start
use Bybit\RestApi\AccountService;
use Bybit\RestApi\AffiliateService;
use Bybit\RestApi\AlphaService;
use Bybit\RestApi\AssetService;
use Bybit\RestApi\BotService;
use Bybit\RestApi\BrokerService;
use Bybit\RestApi\CryptoLoanService;
use Bybit\RestApi\EarnService;
use Bybit\RestApi\EventService;
use Bybit\RestApi\FiatService;
use Bybit\RestApi\LendingService;
use Bybit\RestApi\MarketService;
use Bybit\RestApi\P2pService;
use Bybit\RestApi\PositionService;
use Bybit\RestApi\PreUpgradeService;
use Bybit\RestApi\ReferralService;
use Bybit\RestApi\RfqService;
use Bybit\RestApi\SpotMarginService;
use Bybit\RestApi\SpotXService;
use Bybit\RestApi\SpreadTradeService;
use Bybit\RestApi\StrategyService;
use Bybit\RestApi\TaxService;
use Bybit\RestApi\TradeService;
use Bybit\RestApi\UserService;

Expand All @@ -30,16 +40,26 @@ final class Client
// gen-sdk-php:client-properties:start
public readonly AccountService $account;
public readonly AffiliateService $affiliate;
public readonly AlphaService $alpha;
public readonly AssetService $asset;
public readonly BotService $bot;
public readonly BrokerService $broker;
public readonly CryptoLoanService $cryptoLoan;
public readonly EarnService $earn;
public readonly EventService $event;
public readonly FiatService $fiat;
public readonly LendingService $lending;
public readonly MarketService $market;
public readonly P2pService $p2p;
public readonly PositionService $position;
public readonly PreUpgradeService $preUpgrade;
public readonly ReferralService $referral;
public readonly RfqService $rfq;
public readonly SpotMarginService $spotMargin;
public readonly SpotXService $spotX;
public readonly SpreadTradeService $spreadTrade;
public readonly StrategyService $strategy;
public readonly TaxService $tax;
public readonly TradeService $trade;
public readonly UserService $user;
// gen-sdk-php:client-properties:end
Expand All @@ -52,16 +72,26 @@ public function __construct(?Configuration $config = null)
// gen-sdk-php:client-inits:start
$this->account = new AccountService($this->session);
$this->affiliate = new AffiliateService($this->session);
$this->alpha = new AlphaService($this->session);
$this->asset = new AssetService($this->session);
$this->bot = new BotService($this->session);
$this->broker = new BrokerService($this->session);
$this->cryptoLoan = new CryptoLoanService($this->session);
$this->earn = new EarnService($this->session);
$this->event = new EventService($this->session);
$this->fiat = new FiatService($this->session);
$this->lending = new LendingService($this->session);
$this->market = new MarketService($this->session);
$this->p2p = new P2pService($this->session);
$this->position = new PositionService($this->session);
$this->preUpgrade = new PreUpgradeService($this->session);
$this->referral = new ReferralService($this->session);
$this->rfq = new RfqService($this->session);
$this->spotMargin = new SpotMarginService($this->session);
$this->spotX = new SpotXService($this->session);
$this->spreadTrade = new SpreadTradeService($this->session);
$this->strategy = new StrategyService($this->session);
$this->tax = new TaxService($this->session);
$this->trade = new TradeService($this->session);
$this->user = new UserService($this->session);
// gen-sdk-php:client-inits:end
Expand Down
Loading
Loading