dmitxe / bybit-exchange
1.0
2020-06-25 13:07 UTC
Requires
- php: >=5.5
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ~2.12
- phpunit/phpunit: ^4.8
- squizlabs/php_codesniffer: ~2.6
This package is auto-updated.
Last update: 2024-09-08 14:53:22 UTC
README
Bybit交易所的REST API。基本URI:[https://api-testnet.bybit.com]
此PHP包由Swagger Codegen项目自动生成
- API版本:1.0.0
- 构建包:io.swagger.codegen.languages.PhpClientCodegen
需求
PHP 5.5及更高版本
安装与使用
Composer
要通过Composer安装绑定,请将以下内容添加到composer.json
{
"repositories": [
{
"type": "git",
"url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
}
],
"require": {
"GIT_USER_ID/GIT_REPO_ID": "*@dev"
}
}
然后运行composer install
手动安装
下载文件并包含autoload.php
require_once('/path/to/SwaggerClient-php/vendor/autoload.php');
测试
要运行单元测试
composer install
./vendor/bin/phpunit
入门指南
请按照安装步骤进行操作,然后运行以下命令
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure API key authorization: apiKey $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); // Configure API key authorization: apiSignature $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('sign', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('sign', 'Bearer'); // Configure API key authorization: timestamp $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('timestamp', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('timestamp', 'Bearer'); $apiInstance = new Swagger\Client\Api\APIkeyApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); try { $result = $apiInstance->aPIkeyInfo(); print_r($result); } catch (Exception $e) { echo 'Exception when calling APIkeyApi->aPIkeyInfo: ', $e->getMessage(), PHP_EOL; } ?>
API端点文档
所有URI都是相对于https://api-testnet.bybit.com
模型文档
- APIKeyBase
- APIKeyInfo
- ConditionalBase
- ConditionalCancelAllBase
- ConditionalCancelAllRes
- ConditionalOrdersRes
- ConditionalOrdersResBase
- ConditionalRes
- ExtFields
- FundRecordBase
- FundingFeeBase
- FundingFeeRes
- FundingPredicted
- FundingPredictedBase
- FundingRate
- FundingRateBase
- FundingRecords
- GetRiskLimitRes
- KlineBase
- KlineRes
- Leverage
- LeverageInfo
- LeverageResult
- LinearCreateOrderResult
- LinearCreateOrderResultBase
- LotSizeFilter
- OderBookRes
- OrderBookBase
- OrderCancelAllBase
- OrderCancelAllRes
- OrderCancelBase
- OrderListBase
- OrderListData
- OrderRes
- OrderResBase
- Position
- PositionInfo
- PriceFilter
- QueryOrderBase
- QueryOrderRes
- ReplaceConditionalBase
- ReplaceOrderBase
- RiskIDRes
- RiskLimitBase
- RiskLimitRes
- ServerTime
- SetRiskLimitBase
- SymbolInfo
- SymbolInfoBase
- SymbolTickInfo
- Symbols
- TradeRecords
- TradeRecordsBase
- TradeRecordsInfo
- TradingStopBase
- TradingStopRes
- WalletBalance
- WalletBalanceBase
- WithdrawRecords
- WithdrawResBase
授权文档
apiKey
- 类型:API密钥
- API密钥参数名:api_key
- 位置:URL查询字符串
apiSignature
- 类型:API密钥
- API密钥参数名:sign
- 位置:URL查询字符串
timestamp
- 类型:API密钥
- API密钥参数名:timestamp
- 位置:URL查询字符串