refactor: rename Aster-prefixed universal types to clean names

- AsterOrder → Order
- AsterAccountSnapshot → AccountSnapshot
- AsterAccountPosition → AccountPosition
- AsterAccountAsset → AccountAsset
- AsterDepthLevel → DepthLevel
- AsterDepth → Depth
- AsterTicker → Ticker
- AsterKline → Kline

These types are the platform-agnostic contract used by all 8 exchanges,
not Aster-specific. Renamed across 63 files.
This commit is contained in:
discountry
2026-04-06 18:11:57 +08:00
parent 230c0d5e18
commit fda6bcad1d
62 changed files with 727 additions and 727 deletions
+6 -6
View File
@@ -1,4 +1,4 @@
import type { AsterOrder, CreateOrderParams } from "../types";
import type { Order, CreateOrderParams } from "../types";
import type {
BaseOrderIntent,
ClosePositionIntent,
@@ -25,7 +25,7 @@ function applyCommonFields(params: CreateOrderParams, intent: BaseOrderIntent):
return params;
}
export async function createLimitOrder(intent: LimitOrderIntent): Promise<AsterOrder> {
export async function createLimitOrder(intent: LimitOrderIntent): Promise<Order> {
const params: CreateOrderParams = applyCommonFields(
{
symbol: intent.symbol,
@@ -40,7 +40,7 @@ export async function createLimitOrder(intent: LimitOrderIntent): Promise<AsterO
return intent.adapter.createOrder(params);
}
export async function createMarketOrder(intent: MarketOrderIntent): Promise<AsterOrder> {
export async function createMarketOrder(intent: MarketOrderIntent): Promise<Order> {
const params: CreateOrderParams = applyCommonFields(
{
symbol: intent.symbol,
@@ -53,7 +53,7 @@ export async function createMarketOrder(intent: MarketOrderIntent): Promise<Aste
return intent.adapter.createOrder(params);
}
export async function createStopOrder(intent: StopOrderIntent): Promise<AsterOrder> {
export async function createStopOrder(intent: StopOrderIntent): Promise<Order> {
const params: CreateOrderParams = applyCommonFields(
{
symbol: intent.symbol,
@@ -69,7 +69,7 @@ export async function createStopOrder(intent: StopOrderIntent): Promise<AsterOrd
return intent.adapter.createOrder(params);
}
export async function createTrailingStopOrder(intent: TrailingStopOrderIntent): Promise<AsterOrder> {
export async function createTrailingStopOrder(intent: TrailingStopOrderIntent): Promise<Order> {
const params: CreateOrderParams = applyCommonFields(
{
symbol: intent.symbol,
@@ -85,7 +85,7 @@ export async function createTrailingStopOrder(intent: TrailingStopOrderIntent):
return intent.adapter.createOrder(params);
}
export async function createClosePositionOrder(intent: ClosePositionIntent): Promise<AsterOrder> {
export async function createClosePositionOrder(intent: ClosePositionIntent): Promise<Order> {
const params: CreateOrderParams = applyCommonFields(
{
symbol: intent.symbol,