upbit

Creator: coderz1093

Last updated:

0 purchases

upbit Image
upbit Images
Add to Cart

Description:

upbit

upbit #

✅ Quotation
❌ Exchange
✅ WebSocket

Example #
Quotation #
import 'package:upbit/upbit.dart';
import 'package:upbit/quotation.dart';

void main() async {
final upbit = UpBit();

final markets = await upbit.getMarkets();

markets.forEach((market) => print(market));
}
copied to clipboard
WebSocket #
import 'package:upbit/upbit.dart';
import 'package:upbit/websocket.dart';

void main() {
final upbit = UpBit();

upbit.connectWebSocket();

upbit.webSocket.onData.listen((data) {
print(data);
}, onError: (error) async {
print(error);
await upbit.webSocket.close();
});

upbit.webSocket.requestData(Field(
typeFields: [
TypeField(
type: Type.TICKER,
codes: ['KRW-BTC'],
),
],
));
}
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.