Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add network to rest-api response #49

Merged
merged 1 commit into from
Nov 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-bitbankcc",
"version": "3.0.0",
"version": "3.1.0",
"description": "node-bitbankcc",
"repository": {
"type": "git",
Expand Down
26 changes: 23 additions & 3 deletions src/lib/responseType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,25 @@ export interface AssetResponse {
free_amount: string;
stop_deposit: boolean;
stop_withdrawal: boolean;
withdrawal_fee: any;
withdrawal_fee:
| {
min: string;
max: string;
} // for fiat.
| {
under: string;
over: string;
threshold: string;
}; // for cryptocurrencies.

// only for cryptocurrencies.
network_list?: {
asset: string;
network: string;
stop_deposit: boolean;
stop_withdrawal: boolean;
withdrawal_fee: string;
}[];
}

// Order
Expand Down Expand Up @@ -123,10 +141,11 @@ export interface DepositResponse {
asset: string;
amount: string;

txid?: string | null; // only for cryptocurrencies.
txid?: string | null; // only for cryptocurrencies.
network?: string; // only for cryptocurrencies.

found_at: number;
confirmed_at?: number; // only when confirmed.
confirmed_at?: number; // only when confirmed.
status: string;
}

Expand Down Expand Up @@ -160,6 +179,7 @@ export interface WithdrawalResponse {
// they are only for cryptocurrencies.
label?: string;
address?: string;
network?: string;
txid?: string | null;
destination_tag?: number | string; // only for some cryptocurrencies.

Expand Down