public static void signParams ( Map < String , String > params ) { String requestString = params . entrySet ( ) . stream ( ) . sorted ( Comparator . comparing ( Map . Entry :: getKey ) ) . map ( e -> e . getKey ( ) + "=" + e . getValue ( ) ) . map ( String :: toUpperCase ) . collect ( Collectors . joining ( "&" ) ) ; String sign = md5 ( requestString ) . toLowerCase ( ) ; params . put ( "sign" , sign ) ; params . remove ( "secret" ) ; }
Sign Coinbene private API request parameters .