refactor: restructure aster/ to match standard exchange directory layout

- Move aster-adapter.ts → aster/adapter.ts (consistent with all other exchanges)
- Rename aster/client.ts → aster/gateway.ts (consistent naming)
- Update all imports across 5 files
- Delete old aster-adapter.ts
This commit is contained in:
discountry
2026-04-06 18:17:50 +08:00
parent fb906be27c
commit bc29b23027
7 changed files with 9 additions and 9 deletions
@@ -6,10 +6,10 @@ import type {
KlineListener, KlineListener,
OrderListener, OrderListener,
TickerListener, TickerListener,
} from "./adapter"; } from "../adapter";
import type { Order, CreateOrderParams, Depth, Ticker, Kline } from "./types"; import type { Order, CreateOrderParams, Depth, Ticker, Kline } from "../types";
import { extractMessage } from "../utils/errors"; import { extractMessage } from "../../utils/errors";
import { AsterGateway } from "./aster/client"; import { AsterGateway } from "./gateway";
export interface AsterCredentials { export interface AsterCredentials {
apiKey?: string; apiKey?: string;
+1 -1
View File
@@ -1,5 +1,5 @@
import type { ExchangeAdapter } from "./adapter"; import type { ExchangeAdapter } from "./adapter";
import { AsterExchangeAdapter, type AsterCredentials } from "./aster-adapter"; import { AsterExchangeAdapter, type AsterCredentials } from "./aster/adapter";
import { GrvtExchangeAdapter, type GrvtCredentials } from "./grvt/adapter"; import { GrvtExchangeAdapter, type GrvtCredentials } from "./grvt/adapter";
import { LighterExchangeAdapter, type LighterCredentials } from "./lighter/adapter"; import { LighterExchangeAdapter, type LighterCredentials } from "./lighter/adapter";
import { BackpackExchangeAdapter, type BackpackCredentials } from "./backpack/adapter"; import { BackpackExchangeAdapter, type BackpackCredentials } from "./backpack/adapter";
+1 -1
View File
@@ -1,6 +1,6 @@
import type { ExchangeAdapter } from "./adapter"; import type { ExchangeAdapter } from "./adapter";
import { createExchangeAdapter, resolveExchangeId, type SupportedExchangeId } from "./create-adapter"; import { createExchangeAdapter, resolveExchangeId, type SupportedExchangeId } from "./create-adapter";
import type { AsterCredentials } from "./aster-adapter"; import type { AsterCredentials } from "./aster/adapter";
import type { LighterCredentials } from "./lighter/adapter"; import type { LighterCredentials } from "./lighter/adapter";
import type { BackpackCredentials } from "./backpack/adapter"; import type { BackpackCredentials } from "./backpack/adapter";
import type { ParadexCredentials } from "./paradex/adapter"; import type { ParadexCredentials } from "./paradex/adapter";
+1 -1
View File
@@ -1,7 +1,7 @@
import type { BasisArbConfig } from "../config"; import type { BasisArbConfig } from "../config";
import type { ExchangeAdapter, FundingRateSnapshot } from "../exchanges/adapter"; import type { ExchangeAdapter, FundingRateSnapshot } from "../exchanges/adapter";
import type { AccountSnapshot, Depth, AsterSpotBookTicker } from "../exchanges/types"; import type { AccountSnapshot, Depth, AsterSpotBookTicker } from "../exchanges/types";
import { AsterSpotRestClient, AsterRestClient } from "../exchanges/aster/client"; import { AsterSpotRestClient, AsterRestClient } from "../exchanges/aster/gateway";
import { createTradeLog, type TradeLogEntry } from "../logging/trade-log"; import { createTradeLog, type TradeLogEntry } from "../logging/trade-log";
import { StrategyEventEmitter } from "./common/event-emitter"; import { StrategyEventEmitter } from "./common/event-emitter";
import { safeSubscribe, type LogHandler } from "./common/subscriptions"; import { safeSubscribe, type LogHandler } from "./common/subscriptions";
+1 -1
View File
@@ -1,6 +1,6 @@
import crypto from "crypto"; import crypto from "crypto";
import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { AsterSpotRestClient } from "../src/exchanges/aster/client"; import { AsterSpotRestClient } from "../src/exchanges/aster/gateway";
describe("AsterSpotRestClient", () => { describe("AsterSpotRestClient", () => {
const originalFetch = globalThis.fetch; const originalFetch = globalThis.fetch;
+1 -1
View File
@@ -1,6 +1,6 @@
import { describe, expect, it, beforeEach, afterEach } from "vitest"; import { describe, expect, it, beforeEach, afterEach } from "vitest";
import { createExchangeAdapter, resolveExchangeId } from "../src/exchanges/create-adapter"; import { createExchangeAdapter, resolveExchangeId } from "../src/exchanges/create-adapter";
import { AsterExchangeAdapter } from "../src/exchanges/aster-adapter"; import { AsterExchangeAdapter } from "../src/exchanges/aster/adapter";
import { GrvtExchangeAdapter } from "../src/exchanges/grvt/adapter"; import { GrvtExchangeAdapter } from "../src/exchanges/grvt/adapter";
import { BackpackExchangeAdapter } from "../src/exchanges/backpack/adapter"; import { BackpackExchangeAdapter } from "../src/exchanges/backpack/adapter";
import { ParadexExchangeAdapter } from "../src/exchanges/paradex/adapter"; import { ParadexExchangeAdapter } from "../src/exchanges/paradex/adapter";