97 stable releases

1.7.25 Mar 31, 2024
1.7.24 Dec 24, 2023
1.7.23 Nov 27, 2023
1.7.18 May 6, 2023
0.9.0 Jul 27, 2021

#2898 in Magic Beans

Download history 12/week @ 2024-04-14 1/week @ 2024-04-21 1/week @ 2024-04-28 7/week @ 2024-05-05 3/week @ 2024-05-12 7/week @ 2024-05-19 1/week @ 2024-05-26 17/week @ 2024-06-02 9/week @ 2024-06-09 2/week @ 2024-06-16 4/week @ 2024-06-23 27/week @ 2024-06-30 34/week @ 2024-07-07 30/week @ 2024-07-14 5/week @ 2024-07-21 15/week @ 2024-07-28

86 downloads per month
Used in 5 crates (2 directly)

Apache-2.0

135KB
3.5K SLoC

crypto-contract-value

The value of an unit of contract diffs in different exchanges, and even in the same exchange it differs in different markets.

For example:

  • Each Binance perpetual BTCUSDT contract is valued at 100 USD, and each alt coin contract is valued at 10 USD.
  • Each OKX BTC-USDT-SWAP contract is valued at 0.01 BTC.
  • Each OKX BTC-USD-SWAP contract is valued at 100 USD.
  • The contract value of spot markets is always 1.

Given quantity, the number of traded coins/contracts, we can multiply it by contract_value to get the total traded coins/USDs.

Dependencies

~4–16MB
~233K SLoC