-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
Dev branch
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"presets": [ | ||
[ | ||
"@babel/env", | ||
{ | ||
"modules": false, | ||
"targets": { | ||
"node": "18" | ||
} | ||
} | ||
], | ||
"@babel/typescript" | ||
], | ||
"plugins": ["add-import-extension"] | ||
} |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { CoinspotApiBase } from './coinspotApiBase'; | ||
import { StatusResponse, CoinDepositAddressResponse, QuoteResponse, PlaceOrderResponse, EditOrderResponse, BuyNowOrderResponse, SellNowOrderResponse, SwapNowOrderResponse, CancelOrderResponse, CoinWithdrawalDetailsResponse } from './types'; | ||
export declare class AuthenticatedCoinspotApi extends CoinspotApiBase { | ||
getStatus(): Promise<StatusResponse>; | ||
getCoinWithdrawalDetails(cointype: string): Promise<CoinWithdrawalDetailsResponse>; | ||
getCoinDepositAddress(cointype: string): Promise<CoinDepositAddressResponse>; | ||
getBuyNowQuote(cointype: string, amount: number, amounttype: 'coin' | 'aud'): Promise<QuoteResponse>; | ||
getSellNowQuote(cointype: string, amount: number, amounttype: 'coin' | 'aud'): Promise<QuoteResponse>; | ||
getSwapNowQuote(cointypesell: string, cointypebuy: string, amount: number): Promise<QuoteResponse>; | ||
placeMarketBuyOrder(cointype: string, amount: number, rate: number, markettype?: string): Promise<PlaceOrderResponse>; | ||
editOpenMarketBuyOrder(cointype: string, id: string, rate: number, newrate: number): Promise<EditOrderResponse>; | ||
placeBuyNowOrder(cointype: string, amounttype: 'coin' | 'aud', amount: number, options?: { | ||
rate?: number; | ||
threshold?: number; | ||
direction?: 'UP' | 'DOWN' | 'BOTH'; | ||
}): Promise<BuyNowOrderResponse>; | ||
placeMarketSellOrder(cointype: string, amount: number, rate: number, markettype?: string): Promise<PlaceOrderResponse>; | ||
editOpenMarketSellOrder(cointype: string, id: string, rate: number, newrate: number): Promise<EditOrderResponse>; | ||
placeSellNowOrder(cointype: string, amounttype: 'coin' | 'aud', amount: number, options?: { | ||
rate?: number; | ||
threshold?: number; | ||
direction?: 'UP' | 'DOWN' | 'BOTH'; | ||
}): Promise<SellNowOrderResponse>; | ||
placeSwapNowOrder(cointypesell: string, cointypebuy: string, amount: number, options?: { | ||
rate?: number; | ||
threshold?: number; | ||
direction?: 'UP' | 'DOWN' | 'BOTH'; | ||
}): Promise<SwapNowOrderResponse>; | ||
cancelBuyOrder(id: string): Promise<CancelOrderResponse>; | ||
cancelAllBuyOrders(coin?: string): Promise<CancelOrderResponse>; | ||
cancelSellOrder(id: string): Promise<CancelOrderResponse>; | ||
cancelAllSellOrders(coin?: string): Promise<CancelOrderResponse>; | ||
} | ||
//# sourceMappingURL=authenticatedApi.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { AffiliatePaymentsResponse, BalancesResponse, CoinWithdrawalResponse, CompletedMarketOrdersResponse, CompletedOrdersResponse, DepositHistoryResponse, OpenLimitOrdersResponse, OpenMarketOrdersResponse, OpenOrdersResponse, ReadOnlyStatusResponse, ReferralPaymentsResponse, SendReceiveHistoryResponse, SingleCoinBalanceResponse, WithdrawalHistoryResponse } from './types'; | ||
import { CoinspotApiBase } from './coinspotApiBase'; | ||
export declare class AuthenticatedCoinspotReadOnlyApi extends CoinspotApiBase { | ||
getBalances(): Promise<BalancesResponse>; | ||
withdrawCoin(cointype: string, amount: number, address: string, options?: { | ||
emailconfirm?: 'YES' | 'NO'; | ||
network?: string; | ||
paymentid?: string; | ||
}): Promise<CoinWithdrawalResponse>; | ||
getReadOnlyStatus(): Promise<ReadOnlyStatusResponse>; | ||
getOpenMarketOrders(cointype: string, markettype?: string): Promise<OpenMarketOrdersResponse>; | ||
getMyOpenMarketOrders(cointype?: string, markettype?: string): Promise<OpenOrdersResponse>; | ||
getCompletedMarketOrders(options: { | ||
cointype?: string; | ||
markettype?: string; | ||
startdate?: string; | ||
enddate?: string; | ||
limit?: number; | ||
}): Promise<CompletedMarketOrdersResponse>; | ||
getSingleCoinBalance(cointype: string, available: 'yes' | 'no'): Promise<SingleCoinBalanceResponse>; | ||
getMyOpenLimitOrders(cointype?: string): Promise<OpenLimitOrdersResponse>; | ||
getMyOrderHistory(options: { | ||
cointype?: string; | ||
markettype?: string; | ||
startdate?: string; | ||
enddate?: string; | ||
limit?: number; | ||
}): Promise<CompletedOrdersResponse>; | ||
getMyMarketOrderHistory(options: { | ||
cointype?: string; | ||
markettype?: string; | ||
startdate?: string; | ||
enddate?: string; | ||
limit?: number; | ||
}): Promise<CompletedOrdersResponse>; | ||
getMySendReceiveHistory(startdate?: string, enddate?: string): Promise<SendReceiveHistoryResponse>; | ||
getMyDepositHistory(startdate?: string, enddate?: string): Promise<DepositHistoryResponse>; | ||
getMyWithdrawalHistory(startdate?: string, enddate?: string): Promise<WithdrawalHistoryResponse>; | ||
getMyAffiliatePayments(): Promise<AffiliatePaymentsResponse>; | ||
getMyReferralPayments(): Promise<ReferralPaymentsResponse>; | ||
} | ||
//# sourceMappingURL=authenticatedReadOnlyApi.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export declare class CoinspotApiBase { | ||
protected key: string; | ||
protected secret: string; | ||
constructor(key: string, secret: string); | ||
protected request<T>(path: string, data?: any, readOnly?: boolean): Promise<T>; | ||
} | ||
//# sourceMappingURL=coinspotApiBase.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export {}; | ||
//# sourceMappingURL=demo.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { CoinspotPublicApi } from './publicApi'; | ||
import { AuthenticatedCoinspotReadOnlyApi } from './authenticatedReadOnlyApi'; | ||
import { AuthenticatedCoinspotApi } from './authenticatedApi'; | ||
export * from './types'; | ||
export declare class Coinspot { | ||
readonly public: CoinspotPublicApi; | ||
readonly readOnly: AuthenticatedCoinspotReadOnlyApi | null; | ||
readonly authenticated: AuthenticatedCoinspotApi | null; | ||
private apiKeyRequiredMessage; | ||
constructor(apiKey?: string, apiSecret?: string); | ||
latestCoinPrice(coin: string): Promise<import("./types").SingleCoinPriceResponse>; | ||
latestPrices(): Promise<import("./types").LatestPricesResponse>; | ||
latestBuyPrice(coin: string): Promise<import("./types").BuySellPriceResponse>; | ||
latestSellPrice(coin: string): Promise<import("./types").BuySellPriceResponse>; | ||
openOrderList(coin: string): Promise<import("./types").OpenOrdersResponse>; | ||
completedOrderList(coin: string): Promise<import("./types").CompletedOrdersResponse>; | ||
coinBalance(coin: string): Promise<import("./types").SingleCoinBalanceResponse>; | ||
balance(): Promise<import("./types").BalancesResponse>; | ||
coinDepositAddress(coin: string): Promise<import("./types").CoinDepositAddressResponse>; | ||
marketBuyOrder(coin: string, amount: number, rate: number): Promise<import("./types").PlaceOrderResponse>; | ||
marketSellOrder(coin: string, amount: number, rate: number): Promise<import("./types").PlaceOrderResponse>; | ||
} | ||
export declare const createCoinspotApi: (apiKey?: string, apiSecret?: string) => Coinspot; | ||
export default Coinspot; | ||
//# sourceMappingURL=index.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { LatestPricesResponse, SingleCoinPriceResponse, BuySellPriceResponse, OpenOrdersResponse, CompletedOrdersResponse } from './types'; | ||
export declare class CoinspotPublicApi { | ||
getLatestPrices(): Promise<LatestPricesResponse>; | ||
getLatestCoinPrice(coin: string): Promise<SingleCoinPriceResponse>; | ||
getLatestBuyPrice(coin: string): Promise<BuySellPriceResponse>; | ||
getLatestSellPrice(coin: string): Promise<BuySellPriceResponse>; | ||
getOpenOrders(coin: string): Promise<OpenOrdersResponse>; | ||
getCompletedOrders(coin: string): Promise<CompletedOrdersResponse>; | ||
} | ||
//# sourceMappingURL=publicApi.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.