Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
/**
* Disallow selling TOKEN for BTC in the Dashed-Slug Exchange extension to Bitcoin and Altcoin Wallets
*
* https://www.dashed-slug.net/bitcoin-altcoin-wallets-wordpress-plugin/exchange-extension/
*
* @author alexg
*/
function disallow_limit_ask_orders( $order_id = null, $args = array() ) {
if ( 'BTC' == $args['base_symbol'] && 'TOKEN' == $args['quote_symbol'] && 'ask' == $args['direction'] ) {
throw new Exception( 'You can only buy our TOKEN token, but you can never sell it, sucker!!!! hahaha' );
}
}
add_filter( 'wallets_api_limit_order', 'disallow_limit_ask_orders', 0, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.