upbit 0.1.1 copy "upbit: ^0.1.1" to clipboard
upbit: ^0.1.1 copied to clipboard

UPBIT(업비트) API

upbit Pub Version #

  • ✅ 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));
}

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'],
      ),
    ],
  ));
}
1
likes
100
points
24
downloads

Publisher

unverified uploader

Weekly Downloads

UPBIT(업비트) API

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

crypto, dart_jsonwebtoken, http, uuid, web_socket_channel

More

Packages that depend on upbit