Skip to content

Commit 4d723b4

Browse files
committed
Standardize Bybit HTTP client organization and conventions
1 parent 2232919 commit 4d723b4

File tree

5 files changed

+109
-116
lines changed

5 files changed

+109
-116
lines changed

crates/adapters/bybit/bin/http.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ async fn test_public_endpoints() -> anyhow::Result<()> {
6969

7070
// Test 1: Get server time
7171
println!("1. Testing GET /v5/market/time");
72-
match client.http_get_server_time().await {
72+
match client.get_server_time().await {
7373
Ok(response) => {
7474
println!(
7575
" [OK] Server time: {} (seconds)",
@@ -90,7 +90,7 @@ async fn test_public_endpoints() -> anyhow::Result<()> {
9090
.symbol("BTCUSDT")
9191
.build()?;
9292

93-
match client.http_get_instruments_linear(&params).await {
93+
match client.get_instruments_linear(&params).await {
9494
Ok(response) => {
9595
println!(" [OK] Found {} instruments", response.result.list.len());
9696
if let Some(first) = response.result.list.first() {
@@ -111,7 +111,7 @@ async fn test_public_endpoints() -> anyhow::Result<()> {
111111
.limit(5u32)
112112
.build()?;
113113

114-
match client.http_get_instruments_spot(&params).await {
114+
match client.get_instruments_spot(&params).await {
115115
Ok(response) => {
116116
println!(" [OK] Found {} instruments", response.result.list.len());
117117
for instrument in response.result.list.iter().take(3) {
@@ -133,7 +133,7 @@ async fn test_public_endpoints() -> anyhow::Result<()> {
133133
.limit(5u32)
134134
.build()?;
135135

136-
match client.http_get_klines(&params).await {
136+
match client.get_klines(&params).await {
137137
Ok(response) => {
138138
println!(" [OK] Found {} klines", response.result.list.len());
139139
if let Some(first) = response.result.list.first() {
@@ -157,7 +157,7 @@ async fn test_public_endpoints() -> anyhow::Result<()> {
157157
.limit(5u32)
158158
.build()?;
159159

160-
match client.http_get_recent_trades(&params).await {
160+
match client.get_recent_trades(&params).await {
161161
Ok(response) => {
162162
println!(" [OK] Found {} recent trades", response.result.list.len());
163163
for trade in response.result.list.iter().take(3) {
@@ -196,7 +196,7 @@ async fn test_authenticated_endpoints(api_key: &str, api_secret: &str) -> anyhow
196196
// Test 1: Get open orders
197197
println!("\n1. Testing GET /v5/order/realtime (open orders)");
198198
match client
199-
.http_get_open_orders(BybitProductType::Linear, Some("BTCUSDT"))
199+
.get_open_orders(BybitProductType::Linear, Some("BTCUSDT"))
200200
.await
201201
{
202202
Ok(response) => {

0 commit comments

Comments
 (0)